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

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

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

0 votes



2 answers

Permanent link

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

0 votes

Comments

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



Permanent link

 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

0 votes

Comments

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

  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.

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.

 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

"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

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

 Yes!

showing 5 of 7 show 2 more comments

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,507
× 1,701
× 1,337

Question asked: Sep 07 '21, 12:58 a.m.

Question was seen: 2,065 times

Last updated: Oct 01 '21, 10:56 a.m.

Confirmation Cancel Confirm