Changing Display Text in Rally AttributeComboBox (SDK 2.0p) - rally

I'm having an issue setting the display text for an AttributeComboBox on Rally (SDK 2.0p, not the newer versions). Currently, the AttributeComboBox generates a list of the URL address for each owner within the current project, but not the name of each owner. I thought setting displayField to 'Owner.Name' or something similar would work, but it hasn't. Here is my following code (Javascript):
this.down('#ownerFilter').add({
xtype: 'rallyattributecombobox',
cls: 'filter',
model: 'UserStory',
field: 'Owner',
displayField: 'Owner',
valueField: 'Owner',
allowBlank: false,
listeners: {
ready: this._onOwnerComboBoxLoad,
select: this._onOwnerComboBoxSelect,
scope: this
}
});
(Note: Sample code has been changed. Attribute has been changed from "iteration" to "owner".)
Instead of having my AttributeComboBox generate a list of URL addresses (which do correspond to the owners within the current project), how do I make the names of the owners appear instead?
I feel like the answer is extremely simple, but I haven't been able to figure it out. Any help would be greatly appreciated.

It'd be nice if you could format your code for readability. In any case, You are already specifying the field "Iteration" on the model "UserStory". I believe the displayField could just be set to "Name," since it is already operating on "Iteration".

Related

store a field calculated with Javascript on a hidden field in the Auth0 Lock

I'm using Auth0 lock and would like to store a calculated field with JS during the signup. So far I've added a hidden field like:
additionalSignUpFields: [{
type: "hidden",
name: "myField",
value: "abc123"
}],
During the sign up I change the value of the field using JavaScript, and I can see the value has changed in the HTML. However, the value stored is always abc123. Is there a way to achieve what I want?

GA4 ecommerce items Array do not show up in debug mode

GA4 ecommerce items Array do not show up in debug mode
i am using the GTM, i am sure i passed the Array for items (using Datalayer or CJS), but GA4 does not recognized it , what i see is missing the items tab in debug mode, i don't know how that could be show up , am i doing something wrong? anyone has the same experience?
Looks like the event name is incorrect here -> View_Items.
Make sure that the event name exactly matches view_item
(stylized as snake_case).
As GA4 only allows ecommerce data collection with a set of pre-defined
event names.
Update :
I saw this checkbox is being checked
As you already set the value currency items in the event parameter. You can uncheck this setting.
I think you can follow Google's document about it
view_item_details
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
currency: "USD",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 9.99,
quantity: 1
}
]
Make items array only contain 1 item
Google has a list of recommended events suggesting that the items are automatically collected. If your custom event name doesn't match the listed event, GA4 won't take the items data.
Note that even though you can use the GTM preview mode to check whether the data is correctly constructed, the shown data won't necessarily send to GA4.
The reason is that GTM only forwards the requested data instead of sending it to GA4 directly. To see this behavior, you may have a look at the dev tool such as Chrome dev tool. You can examine the forwarded request's payload in the network tab (search /collect.*/). If it's the recommended event, in payload, there's pr1, pr2, etc., representing your items' array data; otherwise, you'll see nothing, and thus the data won't show up in the GA4 debugging mode.
Do you use the same GTM data layer which initially track for GA Universal events ? If yes, then this may be the cause why the items array did not show on debug view since I found this issue also.
The solution is to create the new GTM Container, and name the data layer differently like 'datalayer2' to differentiate those data layers and set up your config again with 'datalayer2'
for instance, datalayer2.push(
{
event : view_promotion
....}

How to create a module that changes other modules' behaviors

I want to create a module for SocialEngine that changes the signup behavior by adding the option to signup using phone number and sending text message to the user's phone and letting them confirm it. I guess I need to add code in the file application/modules/User/Form/Signup.php. For example, I can add a new field as follows:
$this->AddElement('Text', 'sms', [
'class' => 'signup-name',
'label' => 'Phone Number',
'required' => true,
'validators' => [
['StringLength', true, ['min'=>11, 'max'=>11]]
]
]
);
$this->sms->getValidator('StringLength')->setMessage('Phone must be 11 digits');
However, I don't want to manually add the code. I need to add the functionality by installing the plugin and disable it by removing or disabling the plugin. How can I do that?
Do I need to mess with installation php scripts and do file operations like overwriting files or is there a better way to separate my files completely, meanwhile making them serve as a complement for a given module?

Trello API: Search for list

I am using the path: '/1/search/' to search for items in a Trello board.
According to the documentation, the only modelTypes that this will return are:
[ 'actions', 'cards', 'boards', 'organizations', 'members' ]
I would like to conduct a search for lists, is this possible in the current version of the API?
I don't think it's currently supported.
But, you could use GET /1/boards/[board_id]/lists to get all lists and then perform search from there. You would have to know the Board id though.
https://developers.trello.com/advanced-reference/board#get-1-boards-board-id-lists

Rally: Creating tables dynamically

I'm building a report in Rally that finds all the defects which have been reopened, Then it looks to see if they have been reopened more than once. The table will list ID, description, creation date, then reopened dates. The problem is when I'm building the config file I have no idea how many reopened dates I'm going to need. I see ways of building the table itself dynamically but I cant figure out how to create the config file dynamically in an efficient way.
I had to do this too. You have to find all your information before you build the table.
You need :
-global array
-configuration object (mine is global but it doesn't have to be)
configSettings = [
{key: 'something1', header: 'something2', etc}
{key: ...
]
You need as many
{key: 'something1', header: 'something2', etc}'s
as columns in your table. For example, if you have "schedulestate" and "blocked", then you will need two of those.
Now, each time you loop looking for stuff, you create an object that has the same form as an item in the configuration settings.
localvar = {'something1' : "whatever you want to set it to", 'something2': 'set this to something'};
You can make something1 and something2 rally objects, like dropdowns or checkboxes or whatever. You can put hyperlinks in there, too.
After you have created localvar, you must push it onto the global array:
globalArray.push(localvar);
When you have finished looping, you can create the table.
Like Kyle said, it's hard to answer this without a code snippet from you.