Easy Exporter to Documents for Jira Cloud enables you to export one or multiple Jira issues to pdf templates. Easily create your own templates using the rich text editor or select one of the many available in the template store.
The build in text editor has full support for adding images, tables, styling, fonts and many more features. Work in text edit mode or for power users directly in html. Inject Jira issue data with the powerful and popular template langauge handlebars.
Easily edit the template or write new ones using the rich text editor. Add text, images and tables directly or for full control switch to html mode. Inject the Jira JSON data using the template language handlebars.
The solution supports "a3, a4, a5, legal, letter, tabloid" paper size with "portrait, landscape" orientation. Simple add below meta tag to the top in the html view. If the meta tag is missing the default value is a4 and portrait.
<meta format="a4" orientation="landscape">
The solution also supports header and footer. Add the header at the top of the html view and the footer at the bottom.
<div id="pageHeader">Add your page header text here...</div>
<div id="pageFooter">Add your page footer text here...</div>
Jira issue data is injected with the popular template language handlebars. Please find below some examples and links to more information.
Issue data can be injected in the template both in the editor text mode as well as in html mode. Below examples injects the key of the first issue in the array
In text mode
{{jira.issues.[0].key}}
In html mode
<!--{{jira.issues.[0].key}}-->
Shows the key and summary for all issues on seperated rows.
{{#each jira.issues}}
{{key}} - {{fields.summary}}
{{/each}}
Shows the key and priority for the first issue in the array
{{#with jira.issues.[0]}}
{{key}} - {{fields.priority.name}}
{{/with}}
Handlebar helpers allows you to execute logic on your data. A Handlebars helper call is a simple identifier, followed by zero or more parameters (separated by space). More then 200 helpers are available with a link below.
Shows the issue descriptor including any pictures or formating. Please note the tripple bracket {{{}}} which is needed if html is returned.
{{{jHtml jira.issues.[0].renderedFields.description}}}
Shows the issue assigne name truncated to max 5 characters
{{truncate jira.issues.[0].fields.assignee.displayName 5}}
Shows all attachments including a image thumbnail for image attachments
{{{jAttach jira.issues.[0].fields.attachment}}}
Shows todays date with specified format e.g 01/01/2018 09:00
{{moment date format="DD/MM/YY hh:mm"}}
Handlebars supports having helpers in helpers
{{outer-helper (inner-helper 'abc') 'def'}}
The solution supports 250+ handlebars helpers in the below two main areas.
Handlebars helpers developed for this solution (available with drag & drop)
General Handlebars helpers
1. Jira helpers single issue | Description |
---|---|
{{{jImg url height width}}} |
The helper shows an image
Parameters url - image url height - image height (optional) width - image width (optional) Example {{{jImg "https://www.google.dk/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" 100 100}}} |
{{{jHtml html}}} |
The helper adds images and formating to the html code
Parameters html - The html code Example {{#each jira.issues}} {{{jHtml renderedFields.description}}} {{/each}} |
{{{jAttach attachement boxSeize}}} |
The helper shows the attachments links in a vertical list. If the attachement is an image a
thumbnail is shown above the
link
Parameters attachement - The issue attachement array boxSeize - box size of image thumbnail in pixel. Default is 50 (optional) Example {{#each jira.issues}} {{{jAttach fields.attachment}}} {{/each}} |
{{{jPB}}} |
Page break for the PDF
Example {{{jPB}}} |
{{jHrs time 1}} |
The helper returns the issue time spend in hours and minute.
Parameters time - in the format of numbers or jira time format in string e.g. 1w 4d 2h 10m decimals - number of decimals with default value 1 (optional) Example {{jHrs fields.timespent 1}} |
{{jHrsMin time}} |
The helper returns the issue time spend in hours and minute.
Parameters time - in the format of numbers or jira time format in string e.g. 1w 4d 2h 10m Example {{jHrsMin fields.timespent}} |
{{jCost time hourRate}} |
The helper returns the cost calculated with time multipled with the hourRate
Parameters time - in the format of numbers or jira time format in string e.g. 1w 4d 2h 10m hourRate - hour rate as integer (optional) Example {{jCost fields.timespent 14}} |
{{jExtend key field}} |
The helper takes an issue key and returns that issue field value. This is needed since not all
data of e.g. linked or subtask issues are included in the original issue JSON.
Parameters key - Jira issue key e.g. MOON-12 field - The field to return Example {{#each fields.subtasks}} {{key}} - {{jExtend key "fields.summary"}} {{/each}} |
{{{jBarcode text type scale}}} |
Helper that returns 100+ 1D and 2D barcodes. Complete lists of supported barcodes here!
Parameters text - the barcode text as string type - barcode type as string default is QR (optional) scale - scale barcode 1, 2 or 3 as string with default 1 (optional) Example (The default barcode size is 15*15 mm) {{{jBarcode self}}} Example all parameters {{{jBarcode self "qrcode" "1"}}} |
{{{jBarcodeSize text type height width}}} |
Helper that returns 100+ 1D and 2D barcodes with support setting the size of the barcode. Complete lists of supported barcodes here!
Parameters text - the barcode text as string type - barcode type as string default is QR (optional) height - height in mm as string default 20mm (optional) width - wisth in mm as string default 20mm (optional) Example {{{jBarcodeSize key}}} Example all parameters {{{jBarcodeSize key "qrcode" "30" "30"}}} |
{{{jStatus status}}} |
Helper that returns the issue status in the corsponding Jira color.
Parameters status - the Jira issue status field Example {{{jStatus fields.status}}} |
{{{jIssueKey}}} |
Helper returns the issue key linked to the Jira issue.
Example {{{jIssueKey}}} |
{{{jIssueLinks}}} |
Helper returns a table with all linked issues including icon, description and resolution.
Example {{{jIssueLinks}}} |
{{{jEpicIssues}}} |
Helper returns a table with all issues inlcuded in the epic. Nothing is returned if the issue is not an epic.
The helper can be used without parameters where a default table is returned. Or 1-5 columns can be configured including column width. Parameters column width - column width as string (optional) column value - issue field to show in column as string (optional) column value - issue field to show in column as string (optional) column value - issue field to show in column as string (optional) column value - issue field to show in column as string (optional) column value - issue field to show in column as string (optional) Example One {{{jEpicIssues}}} The colums returned are: Issue key, issue summary, issue assignee, issue priority and issue status Example Two {{{jEpicIssues "10,10,10,10,60" "key" "fields.project.name" "fields.priority.name" "fields.status.name" "fields.summary"}}} |
6. Build-In helpers |
---|
Handlebars comes with a set of build-In helpers. Documentation available here! |
8. Generic helpers |
---|
189 helpers in 20 categories with full documentation available
here! (search
for Categories on the new page)
|
The JSON structor contains an array of Jira issues. Each Jira issue has the below four main parts where fields is the key one.
Below is an example of the top level issue JSON structure. The solution gives you full support browsing through the structure.
Do you have any questions?
We are happy to support you at support@bojaconsulting.com
Value
Company