Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
minLevel1
maxLevel2
outlinefalse
stylenone
typelist
printabletrue

1. Export any sub-task fields including custom fields

Jira issue data only includes a small subset of fields for sub-tasks (see picture below). With the handlebar helper jExtend all fields can be exported including custom fields (see examples below).

...

Code Block
{{#each fields.subtasks}} 

//subtask simple text, number custom field
{{{jExtend key "renderedFields.customfield_10031"}}}

//subtask description
{{{jHtml (jExtend key "renderedFields.description")}}}

//subtask user picker custom field
{{jExtend key "fields.customfield_10041.displayName"}}

//subtask date custom field
{{jDate (jExtend key "fields.customfield_10033") "YYYY-MM-DD"}}

//subtask multiselect custom field
{{jArray (jExtend key "fields.customfield_10039") 'value'}}

//subtask html custom field
{{{jHtml (jExtend key "renderedFields.customfield_10031")}}}

//subtask truncate number value
{{toFixed (jExtend key "fields.customfield_10035") 1}}

//subtask with status
{{#ifeq fields.status.name "In Progress"}} this subtask has status In-Progress{{/ifeq}}

{{/each}}

2. Export sub-tasks in a table

The challenge is to keep the table first row static and then add the sub-tasks row below. To achieve this you need you need to add the sub-task iterator <!--{{#each fields.subtasks}}--> <!--{{/each}}--> as a HTML comments in the editor HTML view. See below screenshots of an example table and the corresponding editor HTML.

...

Code Block
<!DOCTYPE html>
<html>
<head>
    <meta format="a4" orientation="portrait" sortfield="" sortorder="asc">
    <title></title>
</head>
<body aria-disabled="false">
    <br>

    <table style="width: 100%;">
        <tbody>
            <tr>
                <td style="width: 25%; background-color: rgb(97, 189, 109);">Key</td>
                <td style="width: 25%; background-color: rgb(97, 189, 109);">Summary</td>
                <td style="width: 25%; background-color: rgb(97, 189, 109);">Status</td>
                <td style="width: 25%; background-color: rgb(97, 189, 109);">Project</td>
            </tr>
            <!--{{#each fields.subtasks}}-->
            <tr>
                <td style="width: 25.0000%;">{{key}}</td>
                <td style="width: 25.0000%;">{{{jExtend key "fields.summary"}}}</td>
                <td style="width: 25.0000%;">{{{jExtend key "fields.status.name"}}}</td>
                <td style="width: 25.0000%;">{{{jExtend key "fields.project.name"}}}</td>
            </tr>
            <!--{{/each}}-->
        </tbody>
    </table>
    <br>
    <br>
</body>
</html>

3. Export {{ and }} characters

Code Block
{{{{raw}}}}  
  {{escaped}}
{{{{/raw}}}}

4. Export linked issues in customizable table

You can export linked Jira issues in a number of different ways. Below table handlebar helper allows you to export any fields including custom fields, set column width and finally filter on both link type and issue status.

...