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

How do I query RTC work items with a time range

 I am trying to use the RTC API to query workitems that have been created within a certain time frame (i.e between July 1 and Jan 1). I am using the property dc:created to do that but not having much luck with the format / syntax for a range.

This is what I am trying to do and it fails with a - TypeError: 'NoneType' object is not iterable

(Note: I am using a python library - https://pypi.python.org/pypi/rtcclient/0.2.0 )

query_string = ('dc:created>="07-01-2015T01:00:00Z" and dc:created<"01-01-2016T01:00:00Z"')

I have tried reversing the > and < and didn't have much luck either

turning on debug shows - INFO query:Query: Start to query workitems with query string: dc:created>="07-01-2015T01:00:00Z" and dc:created<"01-01-2016T01:00:00Z"

I am able to get data for 

query_string = ('dc:created>="07-01-2015T01:00:00Z"')

and also this works

query_string = ('dc:created>="07-01-2015T01:00:00Z" and dc:type="defect"')

Any help would be greatly appreciated.



0 votes



One answer

Permanent link
 Figured out the solution - Had to switch the date format to YYYY-MM-DD (from MM-DD-YYYY)

This one works - query_string = ('dc:created>="2015-07-01T01:00:00Z" and dc:created<"2016-01-01T01:00:00Z"')

Thanks

0 votes

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
× 457
× 1

Question asked: Mar 03 '16, 9:14 a.m.

Question was seen: 2,316 times

Last updated: Mar 03 '16, 10:38 a.m.

Confirmation Cancel Confirm