How do you extract Primary Text from DNG Artifact when looping through a collection
I've got a Test Plan in RQM that is associated with a collection that when exporting with RPE I want to display a table of the requirements in the collection. I want to pull out the Primary Text as well as custom attribute I've defined that holds my customer Requirement ID (called RID), but not the title of the artifact.
Currently I don't seem able to extract the Primary Text
My RPE Snippet below
For _DNGCollection uri configuration is: href.replace("resources/","/publish/resources?resourceURI=")
For _DNGText uri configuration is: relation.replace("resources/","/publish/resources?resourceURI=")
If I look at the RPE console and manually enter the resource url into my browser which returns the XML reporting URL (https://greygloom.outer.stellar.local:9443/rm/publish/resources?resourceURI=_hSp0Btk6EeS5W6Hvos8Ijw.), what I notice is the 'content' node is missing.
If I'm tracing from a Test Case to Requirement in DNG I have no problems at all
Currently I don't seem able to extract the Primary Text
My RPE Snippet below
For _DNGCollection uri configuration is: href.replace("resources/","/publish/resources?resourceURI=")
For _DNGText uri configuration is: relation.replace("resources/","/publish/resources?resourceURI=")
If I look at the RPE console and manually enter the resource url into my browser which returns the XML reporting URL (https://greygloom.outer.stellar.local:9443/rm/publish/resources?resourceURI=_hSp0Btk6EeS5W6Hvos8Ijw.), what I notice is the 'content' node is missing.
If I'm tracing from a Test Case to Requirement in DNG I have no problems at all
Accepted answer
Are you using data source schema for artifact type "text" or "resources"? For text data source, you can use
relation.replace("resources/","publish/text?resourceURI=");
Also, I suggest using href.replace("resources/","publish/resources?collectionURI=") to configure _DNGCollection.
relation.replace("resources/","publish/text?resourceURI=");
Also, I suggest using href.replace("resources/","publish/resources?collectionURI=") to configure _DNGCollection.
One other answer
There are excellent tutorials on youtube to view by Jorge Garcia.
Are you trying to get the "Name" or the "Content"
- For the content of an collection or module artifact, you create a data source of "text" in the Data Source View in RPE.
- This data source will then show up in the Document Specification - although you can hid it and make the security verification match the "resources" Data Source.
- You will want to create a Data Source Configuration item within a container and then modify the URI to be: about.replace("/resources/","/publish/text?resourceURI=");
- Create a container with the new Data Source and use that. This will iterate over the collection of artifacts and pull the data you need.
- Use "dataSource/artifact/moduleContext/contextBinding/title" to get the content.
- For the custom attribute "RID" - you will need
- container: dataSource/artifact/collaboration
- container: dataSource/artifact/collaboration/attributes/objectType/customAttribute
- query on "name == RID"