Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RTC report REST API: how can I query all items which are not finalized for a year or more?

 Hi!

I do some reporting stuff by the help of RTC's REST API.
For performance reasons, I want to skip all items which are finalized for a year or more.

In other words, I need to query for all items which are not finalized OR which has been finalized after a specific date.

So I need a positive filter like
resolutionDate > xxxx-xx-xx or resolutionDate is undefined
or
!(resolutionDate < xxxx-xx-xx)

The latter one doesn't work because there seems to be no logical negation.

The first one doesn't work because I have no idea how I can query for items whose resolutionDate is undefined.

Does anybody has an idea how I can query all items which are not resolved OR are not resolved for more than a year?

Thanks!
Daniel

0 votes



One answer

Permanent link

You can translate "resolutionDate is undefined" to some other condition. For example, if Resolution Date is not set, it means that the work item is not in the Resolved state, so you can use a condition "state/id != resolved_state_id".

Note 1: Neither state/name nor state/group appears to be supported.
Note 2: You can consider using "state/id in (new_state_id, in_progress_state_id, ...)" instead. In either case, if you are dealing with multiple work item types and multiple workflow, you need to take all the states into consideration.

The filter may become quite complicated, but at least it is doable.

0 votes

Comments

 I thought about that approach but I guessed that there must be a cleaner way and a more template-change-robust way to do that. Anyway, the "in"-operator is new to me and will help to ease the pain. ;)


Thank you for your input!

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,025
× 480
× 35
× 19

Question asked: Apr 09 '18, 10:51 a.m.

Question was seen: 3,077 times

Last updated: Apr 10 '18, 4:12 a.m.

Confirmation Cancel Confirm