It's all about the answers!

Ask a question

How to get artifacts inside a module which are modified between a time range in DNG(Requirements Management) using OSLC query


G C (498) | asked Sep 07 '21, 12:58 a.m.
edited Sep 07 '21, 4:41 a.m.

 How to get artifacts inside a module which are modified between a time range in DNG(Requirements Management)  using OSLC query?

2 answers



permanent link
Ian Barnard (1.9k613) | answered Sep 20 '21, 12:44 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Sep 22 '21, 11:19 a.m.

 Hi G C


Using OSLC Query you can specify a condition for modified dates like:

* oslc.where=dcterms:modified>="2012-08-01T21:51:40.979Z"^^xsd:dateTime and dcterms:modified<"2012-08-02T21:51:40.979Z"^^xsd:dateTime

NOTE the bit after the first = MUST be URL-encoded - the example above will then look like this:

* oslc.where=dcterms%3Amodified%3E%3D%222012-08-01T21%3A51%3A40.979Z%22%5E%5Exsd%3AdateTime%20and%20dcterms%3Amodified%3C%222012-08-02T21%3A51%3A40.979Z%22%5E%5Exsd%3AdateTime

NOTE the times are "Z" only, i.e. UTC.

Whether a resource returned in the query is used in any module isn't AFAIK directly possible to query so you'll have to post-process the results; the ones without a value for rm_nav:parent and with a value for dcterms:identifier are module artifacts.

If you want to find artifacts used in a specific module you could perhaps find all the artifacts used in the module and then marry up the two sets of results, see my answer here https://jazz.net/forum/questions/276909/how-can-i-get-the-module-related-to-a-requiment-artifact-using-oslc-in-ibm-doors-ng?utm_campaign=forum&utm_medium=email&utm_source=forum-answer-accepted&utm_content=forum-question

HTH
Ian


Comments
Ian Barnard commented Sep 22 '21, 11:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Added info about how to find where an artifacts is used in module(s)


G C commented Sep 27 '21, 4:58 a.m.

  Hello Ian Barnard,

Thanks for the answer, I checked using DNG Reportable rest api, to fetch data within a time range but the below query does not give proper results
https://server:port/rm/publish/modules?modifiedSince=2021-08-29T00:00:00.000Z.

Could you please help me in this.


Ian Barnard commented Sep 27 '21, 6:01 a.m. | edited Sep 27 '21, 6:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If you look at the DN Reportable REST API docs https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI it says about modifiedSince that: "it should not be used for document generation" - I don't know what this refers to but the doc does say the results may include deleted resources. Sounds like caveat emptor on modifiedSince.

So it looks like If you want results between specific dates then you'll have to use OSLC Query.

What version+ifix are you using? You really should be using the latest iFix for your version.

G C commented Sep 27 '21, 6:33 a.m. | edited Sep 27 '21, 6:36 a.m.

 I am using 6.0.6.1 version. But if I use OSLC query I will get artifacts data but I need the modules in which these artifacts belongs as well. If I query modules separately and compare these two results the time taken will be more.


I am okay even if DNG Reportable Rest API includes deleted resources but it should have data only after the modified since date


Ian Barnard commented Sep 27 '21, 8:16 a.m. | edited Sep 27 '21, 8:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

"does not give proper results" is too vague to be diagnosable; so what are you getting, what's wrong with it?


BTW modifiedSince when querying modules will only see changes to the module - i.e. the modules propertie or structure, i.e. won't consider changes to artifacts used in the module. You should also use parameter projectURI= the project UUID to reduce the scope and load on the server from querying, and assuming configuration management is in use also use parameter oslc_config.text= the configuration URL


G C commented Oct 01 '21, 8:09 a.m.

Thanks Ian Barnard. Will DNG Reportable Rest API work with 7.0.2 version? 


Ian Barnard commented Oct 01 '21, 10:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Yes!

showing 5 of 7 show 2 more comments

permanent link
Bhagath P B (3888) | answered Sep 07 '21, 3:07 a.m.

Create filter as below which helps you to get artifacts between a date/time range


Comments
G C commented Sep 07 '21, 4:44 a.m.

 Do  you know how we can do it using OSLC query?


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.