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 (453) | 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.2k613) | answered Sep 20 '21, 12:44 p.m.
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


Ian Barnard commented Sep 22 '21, 11:20 a.m.

 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

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.
If you look at the DN Reportable REST API docs 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 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.

"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.


showing 5 of 7 show 2 more comments

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

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

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.