Query

Deprecation Warning! The content below is only applicable for use within deprecated 1.x versions of CA Agile Central's App SDK. Use of the component(s) and/or code on this page is not supported. To develop custom apps within our current environments, please see App SDK 2.1 documentation.

The rally.sdk.util.Query object simplifies the building of complex queries for the CA Agile CentralDataSource component.

Query includes the following topics:

Constructor

Instantiate a new Query object:

var query = new rally.sdk.util.Query('State = "Fixed"');

The constructor parameters for rally.sdk.util.Query are as follows:

Parameter Description Example
clause* The query clause
'State = "Fixed"'

* = Required parameter

Methods

These methods allow queries to be chained together.

Method Name Parameters Return Value Example
and clause* A Query object which contains the the current clause ANDed with the specified clause (may be a string or a Query object)
var query2 = query.and('Priority = "High Attention"');
or clause* A Query object which contains the the current clause ORed with the specified clause (may be a string or a Query object)
var query2 = query.or('Priority = "High Attention"');

* = Required parameter

Static Methods

Static versions of the public methods are also available in order to easily join multiple clauses with the same operator.

Method Name Parameters Return Value Example
and clauses* A Query object which contains the clauses in the specified array ANDed together
var query = rally.sdk.util.Query.and(['State = "Fixed"', 'Priority = "High Attention"']);
or clauses* A Query object which contains the clauses in the specified array ORed together
var query = rally.sdk.util.Query.or(['State = "Fixed"', 'Priority = "High Attention"']);

* = Required parameter

Examples

Simple multi-clause AND (Defects which are State Fixed and Priority High Attention and Severity Major Problem):

rally.sdk.util.Query.and(['State = "Fixed"', 'Priority = "High Attention"', 'Severity = "Major Problem"'])

is equivalent to

'(((State = "Fixed") AND (Priority = "High Attention")) AND (Severity = "Major Problem"))'

Multi-clause, multi-operator chaining (Defects which are either (State Fixed and Priority High Attention) or (Severity Major Problem and RootCause Code)):

rally.sdk.util.Query.and(['State = "Fixed"', 'Priority = "High Attention"']) .or(rally.sdk.util.Query.and(['Severity = "Major Problem"', 'RootCause = "Code"']))

is equivalent to

'(((State = "Fixed") AND (Priority = "High Attention")) OR ((Severity = "Major Problem") AND (RootCause = "Code")))'

フィードバック

ヘルプをお求めですか?CA Agile Central コミュニティは、セルフサービスとサポートのワンストップ ショップです。CA Agile Central サポートにフィードバックを送信したり、答を見つけたり、他のユーザとのコラボレーションには CA Agile Central コミュニティ にご参加ください。