Export template for work items (doc /xml)

Description
natasia0603
Posts: 2
Joined: Mon Feb 19, 2018 12:13 pm

Export template for work items (doc /xml)

Postby natasia0603 » Mon Feb 19, 2018 2:50 pm

Hello,

I am currently trying to generate a doc template for work item export. I found out, that MS Word does not support the used custom markup XML 2003 stuff anymore. Anyway, I started to directly edit the .doc file in an XML editor. That worked quite well so far. But still there are some points which I don't manage to get as I wish to.

My XML code is basically structured like this. (There are multiple <workitem> definitions for multiple types)

Code: Select all

<ns0:workitems>
   [...]
   <workitem type="productRequirement">
      <w:p><w:r><w:t> <type/> </w:t></w:r></w:p>
      <w:p><w:r><w:t> <title/> </w:t></w:r></w:p>
      <w:p><w:r><w:t> <description/> </w:t></w:r></w:p>
      <w:p><w:r><w:t> <customFields id="xxxx"/> </w:t></w:r></w:p>
      <w:p><w:r><w:t> <linkedWorkitems role="medpack_traces_to"></linkedWorkitems> </w:t></w:r></w:p>
   </workitem>
</ns0:workitems>


My questions:
a) no matter what I do, the <title/> gets always the Heading style in word (I just want to have it standard).
b) I only want to have certain custom fields and certain linked work items listed. I tried to do this via "role=...", but it didn't work. After finding the XML Export Schema (https://almdemo.polarion.com/polarion/help/?topic=/com.polarion.xray.doc.user/refchAdminRef.html), I tried the code snippet below. No success so far.

Code: Select all

<linkedWorkitems>
   <LinkedWorkItemList>
      <w:p><w:r><w:t>
         <LinkedWorkItem role="medpack_traces_to"></LinkedWorkItem>
      </w:t></w:r></w:p>
   </LinkedWorkItemList>
</linkedWorkitems>



Does anyone knows how this stuff works?
For reference, I attached the XML full code and an example of the output, feel free to use it. (Note: Even though, export_test.doc is a doc file, it cannot be opened by word. Use an XML editor)

Thank you
Jenny
Attachments
Template.rar
(13.76 KiB) Downloaded 61 times

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 2 guests