The solution uses handlebar template language to populate Jira Issues into word documents. All Jira Issue data is available as clickable items. Once clicked the corresponding handlebar expression is added to the Word document.
Handlebar supports full logic expressions such as if, equals as well as expression in expressions. Find more information on the template language here however most users do not need the details.
Hello World Example
As an example we want to populate some of below Jira Issue MOON-1 data into a Word document.
Handlebar expressions are easily recognised with the format {{ }} or {{{ }}}. There are more than 140 pre-available handlebar Jira data fields grouped in the add-on. We recommend to use the search box and in the example we add key, summary and description by searching and then clicking on the items.
Finally press the “Populate“ button and the Jira data is populated into the template. Then press “Restore“ to go back to the template again.
Advanced
How did the example above work under the hood?
Each Jira Issue is an Javascript JSON object and the handlebars extract information from that object. Viewing the object is available in Jira and the feature will also come to Word in upcoming versions.
Around the handlebar expression there is an each that loops over all Issues. For usability the loop is added automatically by the add-on populating if missing however below code snippet is the full expression.
{{#each jira.issues}} {{key}} - {{fields.summary}} {{{jHtml renderedFields.description}}} {{/each}}