It's all about the answers!

Ask a question

OSLC Query for fetching list of Requirements and Testcases based upon modification Date


0
1
jyoti mishra (45148) | asked Jul 07 '21, 9:27 a.m.
edited Jul 07 '21, 9:36 a.m.

Hello,

 
I want to fetch the list of artifacts or Requirements ,Testcases, TestPlan etc ,which has modified today or modified within date range.
I have used oslc_qm.query to filter based upon specific date but it is not returning filtered data.
Kindly guide me, even if it possible through reportable rest API.

I found below query, but I am not able to get exact output by running this query

==>Include all properties of the test plan(s) with an updated property greater or equal to '2016-02-22T20:16:26.928Z' and less or equal to '2017-02-22T20:16:26.928Z'
<feedUrl>?fields=feed/entry/content/testplan[updated>='2016-02-22T20:16:26.928Z' and updated<='2017-02-22T20:16:26.928Z']/*

<feedUrl> -->which url to be replaced by  feed url


Kindly provide some examples to achieve this either by using oslc or reportable rest API.

Thanks and Regards,
Jyoti

Accepted answer


permanent link
Ian Barnard (2.2k613) | answered Jul 08 '21, 3:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 09 '21, 5:08 a.m.

 Hi Jyoti


For DOORS Next and Engineering Test Management (RQM) - use OSLC Query, you can specify oslc.where the "Modified On"  attribute (as rdf type uri dcterms:modified) is before/after a date using </> and the date-time as a string e.g. "2021-07-01T21:51:40.979Z"^^xsd:datetime - note for DOORS Next the ^^xsd:datetime is required, seems to be optional for ETM for 6.0.6.1 and 7.0.2

So use e.g.:
  • oslc.where=dcterms:modified>"2020-07-01T21:51:40.979Z"^^xsd:datetime
with oslc.prefix including dcterms e.g.

UPDATE:

Here's an example of a fully encoded OSLC query for DOORS Next artifacts modified after 2020-08-01T21:51:40.979Z - note that the Z indicates this is UTC only; other timezones aren't supported.


Sent with headers (possibly case-sensitive, works capitalized as below):

Decoding the parameter values and splitting the parameters onto separate lines to make it easier to read, this looks like:

?oslc.query=true
&oslc.where=dcterms:modified>"2020-08-01T21:51:40.979Z"^^xsd:datetime
&oslc.select=dcterms:identifier,rm_nav:parent
&oslc.paging=true
&oslc.pageSize=200

HTH
Ian

jyoti mishra selected this answer as the correct answer

Comments

David Honey commented Jul 08 '21, 6:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Just to nit-pick. That URL does not appear to be an OSLC query compliant one. oslc.query is not defined by the OSLC Query 3.0 specification. The parameter for specifying a query expression in OSLC Query is oslc.where.


David Honey commented Jul 08 '21, 6:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Your oslc.where unencoded query expression is dcterms:identifier=9, so it's not querying on dcterms:modified. I think what Ian is suggesting is something like (unecoded) dcterms:modified > "2021-07-01T21:51:40.979Z"^^xsd:datetime.


Ian Barnard commented Jul 08 '21, 7:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

See the update to my answer. Not sure why you're using oslc.query; you should be using oslc.where


Ian Barnard commented Jul 09 '21, 5:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Updated my answer - the same oslc.where using dcterms:modified also works for Engineering Test Management


Ian Barnard commented Oct 26 '21, 7:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Checked and oslc.query=true is part of the query capability base URL the DN provides - so that's correct to appear in a full OSLC Query URL to DOORS Next.

showing 5 of 6 show 1 more comments

2 other answers



permanent link
David Honey (1.8k17) | answered Jul 07 '21, 9:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I don't know about reportable REST for test plans. However, https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI shows a common modified property. Try using that instead of updated.


permanent link
Connor Sharp (111) | answered Jul 09 '21, 10:23 a.m.
edited Jul 11 '21, 10:10 a.m.

Thx for all your answers! That post very helpful!

Your answer


Register or 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.