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
I have taken reference from:-https://jazz.net/wiki/bin/view/Main/RqmApi#feedUrl_for_interaction_with_a_f
Kindly provide some examples to achieve this either by using oslc or reportable rest API.
Thanks and Regards,
Jyoti
|
Accepted answer
Ian Barnard (2.2k●6●13)
| 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.:
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.
https://jazz.ibm.com:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fprocess%2Fproject-areas%2F_NDNJ0NcLEeqXpuBdEolY7w&oslc.prefix=dcterms%3D%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%2Crm_nav%3D%3Chttp%3A%2F%2Fjazz.net%2Fns%2Frm%2Fnavigation%23%3E&oslc.where=dcterms%3Amodified%3E%222020-08-01T21%3A51%3A40.979Z%22%5E%5Exsd%3Adatetime&oslc.select=dcterms%3Aidentifier%2Crm_nav%3Aparent&oslc.paging=true&oslc.pageSize=200
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.prefix=dcterms=<http://purl.org/dc/terms/>,rm_nav=<http://jazz.net/ns/rm/navigation#>
&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
jyoti mishra
commented Jul 08 '21, 5:45 a.m.
Hi Ian,
can you provide small example. Below DNG oslc query is working fine,when I am searching by Identifier, but it is not working ,if I replace dcterms:identifier with dcterms:modified,in where condition.
Thanks and Regards,
Jyoti
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
David Honey (1.8k●1●7)
| 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.
|
Thx for all your answers! That post very helpful!
|
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.