Rally - Create filter based on Drop Down (Multi-Value) custom field - rally

Rally - Create filter based on Drop Down (Multi-Value) custom field
We have created a Drop Down (Multi-Value) custom field for releases in Rally. It could have two fields basically,
Field1
Field2
How can we add a filter to select all release records that have Field1 selected? or may be Field1 and Field2 both(using Rally SDK).
e.g. we created a store as follows:
Ext.create('Rally.data.wsapi.Store',{
model: 'Release',
fetch: ['Name','ReleaseDate','ReleaseStartDate', 'Project', 'c_SomeCustomField'],
filters: {property: 'c_SomeCustomField', value:'Field1'},// this we need to achieve
});
where 'c_SomeCustomField' is a Drop Down (Multi-Value) custom field. We need to add filter based on 'c_SomeCustomField' to select all the release records which are having Field1 as a value? or may be Field1 and Field2 both as a value.
Thanks in advance.....

You should be able to do that either on the Timeboxes page for releases or by adding a Custom List app set to Release on your dashboard or a custom page.
If you want to filter by both values at the same time, just create and advanced filter with two conditions for your custom field, OR'ed together. Here is an example screenshot (in this case the multivalue custom field is called Repos Affected):

Achieved using filters: {property: 'c_SomeCustomField', operator: 'contains', value:'Field1'},

Related

SOLR: populate with data from children

I have Products in my SOLR index. I need to create calculated fields for each product. These fields are based on product's children.
Is it possible to create such calculated fields?
For example, I have a Product with id 1, I need to add all the Detail entities, which have "parentId" field value 1. Here is a brief schema: https://www.screencast.com/t/EkNG8NpFp.
I need to have values "v1", "v3" from the example above.
not sure what you exactly mean by "create such calculated fields"...
if you mean if you can query for Products and then for example get the average of field 'value'. Yes you can do stuff like that, look at json facets and how you can use children docs.
if you mean how you can add some new field to your Product doc, based on the values of the children docs, then you can probably do it with Streaming Expressions. You need to use the current collection as a source, and compute the new fields, and finally add the new docs (including the new field) into a new collection

Few questions about Grails' createCriteria

I read about createCriteria, and kind of interested on how these works, and its usability in providing values for dropdown box.
So say, i have a table in the database, Resource table, where i have defined the table in the domain class called Resource.groovy. Resource table has a total of 10 columns, where 5 of it are
Material Id
Material description
Resource
Resource Id
Product Code
So using the createCriteria, and i can use just like a query to return the items that i want to
def resList = Resource.createCriteria().list {
and {
eq('resource', resourceInstance)
ne('materialId', '-')
}
}
Where in the above, i want to get the data that matches the resource = resourceInstance, and none of the materialId is equal to '-'.
I want to use the returned data from createCriteria above on my form, where i want to use some of the column on my select dropdown. Below is the code i used for my select dropdown.
<g:select id="resourceId" name="resourceId"
from="${resList}"
disabled="${actionName != 'show' ? false : true}" />
How do i make it so that in a dropdown, it only shows the values taken from column Product Code? I believe the list created using createCriteria returns all 10 columns based on the createCriteria's specification. But i only want to use the Product Column values on my dropdown.
How do i customize the data if in one of the select dropdown in my form, i wanted to show the values as "Resource Id - Resource Description"? The values are combination of more than 1 columns for one select dropdown but i don't know how to combine both in a single select dropdown.
I read that hql and GORM query are better ways of fetching data from table than using createCriteria. Is this true?
Thanks
First of all refer to the document for using select in Grails. To answer all questions:
Yes, the list to select from in the dropdown can be customized. In this case it should be something like from="${resList*.productCode}"
Yes, this can be customized as well with something like
from="${resList.collect { \"${it.resourceId} - ${it.resourceDesc}\" } }"
It depends. If there are associations involved in a domain then using Criteria will lead to eager fetches which might not be required. But with HQL one gets the flexibility of tailoring the query as needed. With latest version of Grails those boundries are minimized a lot. Usage of DetachedCriteria, where queries etc are recommended whereever possible. So it is kind of mixing and matching to the scenario under consideration.

How to sort data in store depending on conditions in senchatouch

I insert data in store depending on conditions
Ext.getStore('storename').add({
PlanUnplanned:data[i].PlanUnplanned==null?"Unplanned":Planned,
});
Now I am using dataview / dataitem to display the records. How do I sort the store such that the planned records are displayed first and the unplanned records are displayed next in sequence
You can change your store sorting like this:
Ext.getStore('storename').sort('PlanUnplanned', 'ASC');
You also can define that direct on your store
Source: http://docs.sencha.com/touch/2.3.0/#!/api/Ext.data.Store

Adding lookups to given view

I'm just getting into Yii. I have a simple relational db. I have a "client" table related to "orders" table (client:id to orders:client_id). If I build my CRUD for orders i naturally see client_id, however I'd rather add a lookup for client name somehow
I have found how to do this on new and update _forms by adding a dropDownList. The list based views seem a little more complex. I can see that actionIndex() in the controller is gathering data and passing it to index.php, finally through to _view, but I can't find any help on where and how I should break into this with my lookup returning the client name
I'd appreciate any help
thanks
Check the Yii documentation about relations. You will need to create a relation in your orders table, lets call it client, Then in your list view where it generates client_id you can put client.name instead. Now you will need to make sure that you have the appropriate label because in the generated model it will only have a label for client_id, and you need a label for client.name. Yii will guess, or you can add it, or you can modify the label for client_id, and instead of using client.name in the view you can use
array(
'name'=>'client_id',
'value'=>$model->client->name,
)
I tend to gravitate towards more explicit definitions rather than shortcuts, but to each his own.

Get the Attributes filter by using its display name?

I am trying to desgin a MDX query with Date filter which is an hierarchy attribute.. Now, I need to place the attribute filter value in the "where" clause.. When I drag and drop the attribute say - '2012', it gets converted to someother format like '[Date].[Fiscal Hierarchy].[Year].&[2.012E9]' whereas in leftpane display it shows as 'YR 2012'..
How do I control this conversion ? I am not sure on what basis it converts this attribute like that ?..
I need to build the MDX query dynamically in program based on the user selection.. How do I determine it is '2.012E9' when the user selectes '2012'? Or is there any way to alter the filter condition in MDX so that I can acheive this without using [2.012E9] string ?
Thanks in advance..
SELECT
[Subjects].[Name] on Rows,
[Student].Name ON COLUMNS
FROM Cube
where
[Date].[Fiscal Hierarchy].[Season].&[**2.0121E9**]
-- But the left side pane(Cube browser) shows the attribute as 'YEAR 2012'
Each member has a unique name and a display name.
In the left pane you see the display name. In the Mdx query the key of the member is used (see MSDN).
If you want to change the unique names you have to change your keys.
I am able to do this by changing the query like this:
SELECT
[Subjects].[Name] on Rows,
[Student].Name ON COLUMNS
FROM Cube
where
[Date].[Fiscal Hierarchy].[Season].[YEAR 2012]