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

How to get the project area and the test script or test case id using Sparql

I need to create a report of all test case and test scripts that were modified in a single project area with in the last 15 days. The output should be Project Area, Type, Test Case or Test Script id, Title, Title, Modified by name, and modification date. I looked at Report Builder and I could not find a modified by or modification date to select for the report. I did search the web and I found articles about Sparcql. I went into the advanced section and tried to modify what was there but I did not know how to select to the modified by or modification date fields using the syntax in the original sql. I did create my own and I uploaded it along with an export of the produced report. The problem is that I do not get a value for the project area and I get the url instead of the Test Script or Test Case id.

What I would like to know is what modifications would I need to the Sparcql I created in order to display the Project Area and the Test Case or Test Script id values not the url.


Please note:  I do not know sql.  What I created was from looking on the web and ChatGPT.  The following is what I have:

PREFIX dcterms: <http://purl.org/dc/terms/>


SELECT ?projectArea ?type ?id ?title ?modifiedByName ?modifiedDate
WHERE {

  # Test Case
  {
    ?artifact rdf:type qm:TestCase .
    BIND("Test Case" AS ?type)
  }
  UNION
  {
    # Test Script
    ?artifact rdf:type qm:TestScript .
    BIND("Test Script" AS ?type)
  }

  ?artifact dcterms:title ?title .
  ?artifact dcterms:modified ?modifiedDate .
  ?artifact dcterms:identifier ?id .
  ?artifact dcterms:creator ?modifiedBy .

  OPTIONAL { ?modifiedBy foaf:name ?modifiedByName . }
  

  OPTIONAL { ?artifact oslc:serviceProvider ?projectAreaUri .
             ?projectAreaUri dcterms:title ?projectArea . }

  FILTER(?modifiedDate >= NOW() - "P15D"^^xsd:dayTimeDuration)

}

0 votes



3 answers

Permanent link

Hi Bob,


Did you try using 'Last Update Date'?


0 votes


Permanent link

That gets the last update date but I still need to get who made the update.

0 votes


Permanent link

I was not able to find 'Modified by' option. This might be data gap in TRS feed. Have you tried using Publishing to get this information?



0 votes

Comments

We do not have RPE.  It would be nice is someone was fluent with Sparql and could look at my script and tell me how to get the id instead of the url for the id and how to get the project area. 

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
× 12,133
× 26

Question asked: Mar 25, 10:53 a.m.

Question was seen: 286 times

Last updated: Mar 27, 12:08 p.m.

Confirmation Cancel Confirm