If the fields to be exported are configured to use a Wiki Markup Renderer, it´s possible to place the wiki rendering in the result document. 

Definition:

${wiki:<Field name>}

Expand to see the examples on sample code
${wiki:Description}
${wiki:Custom Free Text}

When creating an Excel template document you should use: ${wiki:Description}

Xporter for JIRA also allows generating hyperlinks on the fly.

Definition:

@{title=<Link Title>|href=<Link Address>}
Generate a link named with issue key, linking to the issue address on the JIRA Server
@{title=${Key}|href=${BaseURL}/browse/${Key}}

When creating an Excel template document you should use: ${link:title=${Key},href=${BaseURL}/browse/${Key}}

If the fields to be exported are configured to use an HTML renderer, such as the one provided by the  JEditor plugin, it´s possible to place the HTML rendering in the result document. 

Definition:

${html:<Field name>}

Expand to see the examples on sample code
${html:Description}
${html:Custom Free Text}

When creating an Excel template document you should use: ${html:Description}

Xporter for JIRA allows applying Wiki or HTML functions in the text rendered based on javascript. For example, if the fields to be exported are configured to use the "Default Text Renderer" renderer, provided by JIRA, it is possible to use Javascript to format the field using the notation explained in Javascript and then apply the Wiki or HTML functions. It is also possible to use Javascript to format fields that are configured to use Wiki Markup Renderer or an HTML renderer, such as the one provided by the  JEditor plugin and then apply the Wiki or HTML functions. To achieve that, the Javascript function should be defined as a field in the template and the function to be applied to that field. 

Definition:

${wiki:%{<Javascript>}}

or

${wiki:%{<Javascript>}

Formatting the first word in field "Description" to "Bold", "Italic" or to have a different text color (Red in the examples) using HTML function
${html:%{var t ='<b>'+'${Description}'.split(' ')[0] +'</b>'+'${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}}
${html:%{var t ='<i>'+'${Description}'.split(' ')[0] +'</i>'+'${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}} 
${html:%{var t ='<b>'+'<font color="Red">'+'${Description}'.split(' ')[0] +'</b>'+'</font>'+'${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}}
Formatting the first word in field "Description" to "Bold", "Italic" or to have a different text color (Red in the examples) using Wiki function
${wiki:%{var t ='*'+'${Description}'.split(' ')[0] +'*'+' ${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}}
${wiki:%{var t ='_'+'${Description}'.split(' ')[0] +'_'+' ${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}}
${wiki:%{var t ='{color:red}'+'${Description}'.split(' ')[0] +'{color}'+' ${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}}

 

 

  • No labels