Via XSLT and XSL-FO, very different templates can be created individually. If you know the technology, you have various options to design them. In this documents, you get the basic information to manage this.

JIRA Issues as XML Data

The following example XML document shows you how to edit in your XSLT stylesheet.

Beispiel-XML File
<?xml version="1.0" encoding="UTF-8" ?>
<issues>
	<issue>
		<___ip.key___>KBEP-1</___ip.key___>
		<___ip.summary___>Swimlanes on Kanban boards</___ip.summary___>
		<___ip.description___><p><b>HTML-Formatted description</b></p></___ip.description___>		
		<___ip.qrcodeimage___><!-- Base 64 encoded image content --></___ip.qrcodeimage___>
	</issue>
	<issue>
		<___ip.key___>KBEP-2</___ip.key___>
		<___ip.summary___>The second description</___ip.summary___>
		<___ip.description___>The second issue</___ip.description___>		
		<___ip.qrcodeimage___></___ip.qrcodeimage___>
	</issue>
</issues>

JIRA fields that can be used within templates

The elements in the issue view, marked with colored circles, are partially part of the existing templates or can be used to create new templates. Apache FOP is used to transform templates in XSL-FO format (in a special XSL style sheet, W3C-Standard) for direct printing or .pdf creation.

 

Placeholder for JIRA entries for use in templates

You can use the following place holders in the templates for the items marked in the issue view above. To test all fields, the template seibertmedia can be used.

JIRA

  1. Issue key (___ip.key___)
  2. Summary (___ip.summary___)
  3. Description (___ip.description___)
  4. Issue type (___ip.issuetype___)
  5. Issue type icon (___ip.issuetypeIcon___)
  6. Better and bigger Issue type icon (___ip.issuetypeStyledIcon___)
  7. Priority (___ip.priority___)
  8. Priority Icon (___ip.priorityAsIcon___)
  9. Labels (___ip.labels___)
  10. Components (___ip.components___)
  11. Status (___ip.status___)
  12. Fix versions (___ip.fixVersions___)
  13. Resolution (___ip.resolution___)
  14. Assignee - Username (___ip.assignee___)
  15. Assignee - Fullname (___ip.assigneeName___)
  16. Reporter - Username (___ip.reporter___)
  17. Reporter - Fullname (___ip.reporterName___)
  18. Creator - Username (___ip.creator___)
  19. Creator - Fullname (___ip.creatorName___)
  20. Due date (___ip.duedate___)
  21. Original estimated time (time) (___ip.originalEstimate___)
  22. Remaining estimated time (time) (___ip.timeestimate___)
  23. Time spent (___ip.timespent___)
  24. Date created (___ip.created___)
  25. Date updated (___ip.updated___)
  26. Resolution date (___ip.resolutionDate___)
  27. Votes (___ip.votes___)
  28. Parent (___ip.parent___)
  29. Project name (___ip.projectName___)

 

JIRA-Agile
  1. Epic link (___ip.epiclink___)
  2. Sprint (___ip.sprint___)
  3. Story Points (___ip.storypoints___)
  4. Rank (___ip.rank___)
Additional
  1. URL (___ip.url___)
  2. Storypoint color (___ip.storypointsColor___)
  3. QR code of URL (___ip.qrcodeimage___)
  4. Estimate (SP or hours) (___ip.estimate___)
  5. Custom fields
    • Pattern: ___ip.customfield_xxx___
    • xxx corresponds to numbers, i.e. ___ip.customfield_10000___.
    • A complete table of all fields can be found on the global configuration page.
  6. Issue links
    • Pattern: ___ip.issuelinks__direction_inward__[id_xxxxx__maxlength_xx__maxlinks_x]___
    • argument direction is required; specify the link direction of the issue links; options: inward, outward
    • argument id is optional; filter to a specific issue link type; the issue link type id
    • argument maxlength is optional; limit the length of the issue link description; number of allowed letters
    • argument maxlinks is optional; limit the number of issue links; maximum number of issue links

Custom template examples

4 issues on one A4 page

The first thing to ajust is the default paper format: Change it to A4 landscape within <fo:simple-page-master>. Then define two columns in the Tag <fo:region-body>:

<fo:layout-master-set>
  <fo:simple-page-master master-name="A4-landscape" page-height="21cm" page-width="29.7cm" margin="0.5cm" margin-top="0.3cm">
    <fo:region-body margin="5mm 0mm 5mm 0mm" column-count="2" column-gap="4mm" />
  </fo:simple-page-master>
</fo:layout-master-set>

The next think to ajust is <page-sequence>:

<fo:page-sequence master-reference="A4-landscape" font-family="'DejaVu Sans'" font-size="10pt">
  <fo:flow flow-name="xsl-region-body">
    <xs:apply-templates select="//issue" />
  </fo:flow>
</fo:page-sequence>

Then use the xsl template definition <template match="issue"> to rint your specific issue layout.

Please see the complete XSL file for a working example: FourOnA4.xsl

Changing the paper format

Download a template from the "InstaPrinta Global Configuration" page and open it with a text-editor of your choice. Now jump to the 10th line and customize the paper format:

page-height="10.5cm" page-width="14.8cm" margin="0.5cm" margin-top="0.5cm">

Instead of cm (centimeters) you can also use in (inches).

Upload the template under a new name and that's it.

Inserting blank lines

Insert the following code block to create blank lines:

<fo:block>
<fo:leader />
</fo:block>

  • No labels

This content was last updated on 06/27/2017.

This content hasn't been updated in a while. That doesn't have to be a problem. Some of our pages live for years without becoming obsolete. Please click this link if you want us to update this page. Old content can be incorrect, misleading or outdated. Please get in contact with us via a form on this page, our live chat or via email with content@seibert.group if you are in doubt, have a question, suggestion, or want changes from us.