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

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

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

1

0 votes


Accepted answer

Permanent link

 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

0 votes

Comments

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.

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.

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

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

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

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.

0 votes


Permanent link

Thx for all your answers! That post very helpful!

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
× 7,494
× 1,324

Question asked: Jul 07 '21, 9:27 a.m.

Question was seen: 2,405 times

Last updated: Oct 26 '21, 7:06 a.m.

Related questions
Confirmation Cancel Confirm