How to create a filter or query on the Display Color of an Artifact in Rally?
The hex codes for the colors are used for the display colors on the Artifact. They are stored in the DisplayColor attribute on the Artifact Object.
HierarchicalRequirement, Defect, Task and other work item types inherit from Artifact type, and can be queried by DisplayColor attribute since it exists on the parent abstract type:
An example of the query you would use for them is:
( DisplayColor = "#105cab" ) or ( DisplayColor != null )
Color | Hex code | |
---|---|---|
|
Dark Blue | #105cab |
Blue | #21a2e0 | |
|
Green | #107c1e |
Purple | #4a1d7e | |
Pink | #df1a7b | |
|
Burnt Orange | #ee6c19 |
Orange | #f9a814 | |
|
Yellow | #fce205 |
|
Grey | #848689 |
Example to find out the color of an artifact via WS API.
In this example a Feature F123 is used.The steps below apply to any object that inherits from Artifact abstract type (e.g. HierarchicalRequirement, Defect, Task)
1. Open details page of one of the features, e.g. F123
2. Set the color to the first color available in the Display Color field
3. Click outside of the color picker, let Rally's Editable Details Page to save the value
4. In another tab of the same browser go to WS API interactive document
5. Run a query on PortifoliItem/Feature by FormattedID: (FormattedID = F123)
Check the "fetch full objects" checkbox to make sure DisplayColor is returned
6. DisplayColor is included in the result's json.
NOTE: DisplayColor attribute was introduced in WS API in version 1.43. Version 1.43 and below are currently deprecated.
WS API queries against versions prior to WS API 1.43 will not return DisplayColor.
NOTE: The white square with the diagonal red line means default color or "null" value.
When a card is set to default color or null value, the color displayed will be the same color as the lighter blue color, even though the attribute value will be listed as "null" as opposed to "#21a2e0".