Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 9 Next »

BOJA Technology add-ons come with a high quality 24/5 support

Common support questions

1. How do I export sub-task 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).

Jira issue sub-task data (View Data tab)

image-20241113-100018.png

Export handlebars

{{#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. How do I export {{ or }} characters?

{{{{raw}}}}  
{{escaped}}
{{{{/raw}}}}

3. 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.

export_subtask_1.pngexport_subtask_2.pngexport_subtask_3.png
<!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>
  • No labels