This type represents a single “work item” in Shibumi. Items for all templates are represented by this single GraphQL type. It allows access to fields and metrics on the item, as well as navigation to ancestor, descendant, and associated items.
Work items can only be fetched by users with the appropriate permission. Lack of permission will yield a null result.
Finding IDs
To fetch data about a specific work item, api users must know both the work item’s template, and its id. Both of these can be found via the UI by clicking the gear icon in the upper-right corner of any work item to bring up the settings dialog. This shows, among other things, the template api name and id number for the current item.
Note that work item ids are not globally unique; they are only unique among other items with the same template.
Implements
Fields
id (ID!)
The id of this work item.
type (String!)
The api name of this work item’s template.
url (String!)
The location of this work item.
name (String!)
This work item’s name.
attribute (String)
Queries the value of the specified field for this work item. For a list of field api names, see the data tab on the item’s template, or use the /app/templates query. Querying an invalid api name will result in an error.
Argument | Type | Description |
---|---|---|
apiName | String! |
The api name of the field whose value should be fetched. |
metric ([Float]!)
Queries metric data for a specific dataset / time period. For a list of metric api names, see the data tab on the item’s template, or use the /app/templates query. Querying an invalid api name will result in an error.
The two datasets currently supported are “actual__d” and “target__d”.
Argument | Type | Description |
---|---|---|
apiName | String! |
The api name of the metric whose value should be fetched. |
dataset | String! |
The api name of the datset whose value should be fetched. |
dates | [String! ]! |
The list of dates to fetch values for. |
association (AssociatedWorkItem)
Queries the value of the specified association for this work item. For a list of association api names, see the data tab on the item’s template, or use the /app/templates query. Querying an invalid api name will result in an error.
This query returns an AssociatedWorkItem, rather than a regular WorkItem. This allows users to query the id and name of the associated item, even if they do not have access to the item itself.
Argument | Type | Description |
---|---|---|
apiName | String! |
The api name of the association whose value should be fetched. |
backreference (Connection to WorkItem)
Queries the set of items associated with this item via a specific association field. The items can be filtered as part of the query. Only items the current user has access to will be returned from a backreference query; other items will be ignored.
Argument | Type | Description |
---|---|---|
apiName | String! |
The api name of the backreference whose value should be fetched. |
filters | [Filter! ] |
An optional list of filters to apply before returning backreferences. |
participants (Connection to Participant)
The set of users who hold a specific role on this item. This query has a maximum page size of 100 items.
Argument | Type | Description |
---|---|---|
role | String! |
The api name of the role of interest. |
first | Int! |
See Pagination. |
after | String |
See Pagination. |
parent (WorkItem)
This item’s parent, or null if it is at the top of the hierarchy.
descendants (Connection to WorkItem)
This field allows fetching connections to descendants of a specific type. Descendants are any work item that appears below this item at any level of the hierarchy. Filters can be applied, so that only descendants matching the filter are returned.
Argument | Type | Description |
---|---|---|
type | String! |
The api name of the template whose instances we are looking for. |
filters | [Filter! ] |
An optional list of filters to apply before returning descendants. |
first | Int! |
See Pagination. |
after | String |
See Pagination. |