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

How can I access data from a ?stylesheet=true field? in RPE

 I need to report on the section names of a test plan in RPE. I can access these names using the URI:

https://<server>:<port>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<Project+Name>/testplan/urn:com.ibm.rqm:testplan:<testPlanNumber>?stylesheet=true
this gives output that looks like this:
  <?xml version="1.0" encoding="UTF-8" ?> 
- <ns21:stylesheet xmlns:ns21="http://www.w3.org/1999/XSL/Transform" ttp://jazz.net/xmlns/alm/v0.1/" xmlns:ns6="http://purl.org/dc/terms/" ..............>
- <ns2:sections>
<ns2:section id="com.ibm.rqm.planning.editor.section.dynamicSection_1519188863945" name="H1 INTRODUCTION" /> 
<ns2:section id="com.ibm.rqm.planning.editor.section.planSummary" name="H2 Overview" /> 
<ns2:section id="com.ibm.rqm.planning.editor.section.dynamicSection_1519174175290" name="H3 Purpose" /> 
<ns2:section id="com.ibm.rqm.planning.editor.section.planTestScope" name="H4 Scope" /> 
<ns2:section id="com.ibm.rqm.planning.editor.section.dynamicSection_1519187707369" name="H5 Interrelationships" /> 
<ns2:section id="com.ibm.rqm.planning.editor.section.planNormativeInformative" name="H6 Referenced Documents" /> 
<ns2:section id="com.ibm.rqm.planning.editor.section.dynamicSection_1519176378808" name="H7 Abbreviations" /> 
<ns2:section id="com.ibm.rqm.planning.editor.section.dynamicSection_1518151700440" name="H8 Definitions" /> 
<ns2:section id="com.ibm.rqm.planning.editor.section.dynamicSection_1519176438106" name="H9 Document Preparation" /> 
<ns2:section id="com.ibm.rqm.planning.editor.section.dynamicSection_1518151324592" name="ANNEX A. Data Item Description Traceability" /> 
</ns2:sections>
</ns21:stylesheet>
I cannot access this data because there is no stylesheet>sections>section value in any data source. I cannot use a URI without ?stylesheet=true because it does not give me the updated names (which have been modified throught DNG)

0 votes


Accepted answer

Permanent link

You need to edit qm.xsd schema so as to honor the dynamic sections. In RPE, you can open the schema in Editor and make the necessary changes. You should get the ID of your section (ex. "com.ibm.rqm.planning.editor.section.dynamicSection_1519188863945") and add the custom section definition inside these tags:<xs:element name="testplan">/<xs:complexType>/<xs:complexContent>/<xs:extension base="reportableArtifact">/<xs:sequence>

Insert the following:

<xs:element name="testplan">
    <xs:complexType>
        <xs:complexContent>
            <xs:extension base="reportableArtifact">        
                <xs:sequence>
                    <xs:element maxOccurs="1" minOccurs="0" name="com.ibm.rqm.planning.editor.section.dynamicSection_1519188863945" type="xs:string">
                <xs:annotation>
                            <xs:appinfo>
                                <label>H1 INTRODUCTION</label>
                            </xs:appinfo>
                        </xs:annotation>
                    </xs:element>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
</xs:element>

Make sure that you insert the xml in the correct resource tag (<xs:element name="testplan">)
After saving the schema, testplan/dynamicSection_1519188863945 will return the data you are looking for.

Note that this data will be in JSON format and need to be parsed using JavaScript so.

Harrison Vince selected this answer as the correct answer

0 votes

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,014

Question asked: Mar 28 '18, 9:27 p.m.

Question was seen: 1,701 times

Last updated: Mar 29 '18, 2:53 a.m.

Related questions
Confirmation Cancel Confirm