Reputation: 8395
I am writing a custom app for Rally and I would like to filter the data to stories with specific tags. So far I haven't found a way to write the correct syntax to achieve this purpose. Here's an example of a standard query that I would include in the cardboardConfig:
var query = new rally.sdk.util.Query('SomeField = "Some Value"');
This works well enough when trying to query a field that contains a single value, but this doesn't appear to work on tags since tags are arrays -- assuming I am even referencing the correct field name. I tried all of the following without success:
var query = new rally.sdk.util.Query('Tags = "Some Value"');
var query = new rally.sdk.util.Query('Tags contains "Some Value"');
var query = new rally.sdk.util.Query('Tag = "Some Value"');
var query = new rally.sdk.util.Query('Tag contains "Some Value"');
var query = new rally.sdk.util.Query('Tags = {"Some Value"}');
var query = new rally.sdk.util.Query('Tags contains {"Some Value"}');
var query = new rally.sdk.util.Query('Tag = {"Some Value"}');
var query = new rally.sdk.util.Query('Tag contains {"Some Value"}');
var SearchTags = { "Some Value" };
var query = new rally.sdk.util.Query('Tags = SearchTags');
var SearchTags = { "Some Value" };
var query = new rally.sdk.util.Query('Tags contains SearchTags');
What is the correct field name and operator for filtering the data to specific tags?
Upvotes: 2
Views: 2802
Reputation: 8098
Try this:
var query = new rally.sdk.util.Query('Tags.Name Contains "Some Value");
This works for tags, but won't currently work for all collections.
Upvotes: 4