Document toolboxDocument toolbox

Design Guide

Format the Page

You can store page format settings in your template. The page format is used for preview and printing.

format_page.png
Adjust page format settings

Safari does not support issue template format settings. You have to configure format, orientation or margins in the print dialog of Safari.

Change the Size of Your Card

To change the size of a predefined template you only have to change the style attribute of the outermost division in the template like shown below.

size_of_card.png

Adding Fields to Your Card

You can put almost every field onto your card, even custom fields. Most fields are rendered as in the browser by JIRA. Therefore, you may also print your nicely formatted descriptions. You can see a list of available fields in the Help section on the right.

All JIRA system fields are available under the variable issue. All custom fields can be accessed by issue.customfield. If a field exists its value is never null but empty. You can check for field existence by using an if-clause. This is only necessary for custom fields if you want to prevent your template to fail when the custom field is renamed or deleted.

Examples

Examples

{$issue.summary}

Prints the summary of the issue.

${issue.customfield.sprint}

Prints the value of the custom field "Sprint". Note that the field must exist, otherwise an error will be thrown.

{if $issue.customfield.storyPoints} {$issue.customfield.storyPoints} SP {/if}

Prints the value of the custom field "Story Points" if such a field exists.

If your rendered field contains any html you need to set the noAutoescape print directive to correctly render your field

Change the Border of Your Card

To change the border of a predefined template you need to adjust the border-division of the card. You may also change the appropriate CSS style at the beginning of the template for more advanced borders.

If the border should depend on any value of the issue like the priority or the issue type just use the following:

  1. Give the division a new attribute like "issue-type" and use the appropriate value:

     

  2. Write some CSS rules that depend on the attribute value:

    Note that you have to use {lb} and {rb} instead of { and }, because { and } cannot be used directly as these are reserved characters in Closure Templates.

Starting from Scratch

If you want to start from scratch, create a new template based on the Blank design. This design only defines some important CSS rules as well as the outermost division. You always need one outermost division with the CSS-class ip-card, otherwise, template rendering will fail.

When designing your template, please be aware that browsers cannot be controlled completely via CSS for printing. You may have to configure the following settings in your browsers print dialog:

The template language is Closure Templates so you may do anything that is possible via this template language.

Look at the useful snippets below or the predefined templates to get an idea of possible designs.

Useful Snippets

Card sizing

Wherever you have boxes for content with padding or borders you should apply the following CSS-rule to make it easier to ensure that the card is not enlarged by your border or padding: 

Layout

If you want to place content next to each other, tables are the easiest way: