RQM API - querying for records updated in a given range
The RQM API has a great function called modifiedSince. It'll let you specify a dateTime and return all records modified since that date.
What if I only want to return artifacts from a given date range? Something like, return all recirds updated between 2014-08-01T00:00:00 and 2014-09-01T00:00:00? The modifiedSince function says to consider using fields instead, and this implies that the functionality I want is possible. But unfortunately, the greater than and less than operators don't appear to work with a filter on updated. This works: executionresult?fields=/feed/entry/content/executionresult[updated='2014-08-03T00:27:24.612Z'] This does not: executionresult?fields=/feed/entry/content/executionresult[updated>='2014-08-03T00:27:24.612Z'] (it returns all results) Here's the documentation for modifiedSince. Am I missing something? Why would I use fields filtering if I had to know the milliseconds I was looking for? modifiedSince<feedUrl> only.
In addition, see note 15 on the
As an alternative, use fields filtering. |
Accepted answer
Hi Ken,
You could use a field filter like:
?fields=feed/entry/content/executionresult[updated>=
'2014-08-03T00:00:00.000Z' and
For more information, see https://jazz.net/wiki/bin/view/Main/RqmApi#fields. If the inequality operators are not working, please open a RQM defect. Kevin Murphy selected this answer as the correct answer
Comments
Kevin Murphy
commented Sep 17 '14, 1:48 p.m.
Hey Paul,
Kevin Murphy
commented Sep 17 '14, 2:08 p.m.
Get this -- I messed with Paul's suggestion while entering the defect (but before submitting it) and it worked! I am not sure what was not working yesterday.
Kevin, the only difference appears to be < versus <= operators. Can you try the <= operator?
|
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.