Is it possible to customize the output format of the MS word file which can be generated for an issue?

Benny Varughese April 2, 2012

My goal is to have different output format for the generated MS word file generated using the view -> word functionality in Jira.


A word file generated for an issue type, for example “Change request”, may contain specific data and would have a specific format where as the export of the issue type “Problem” would look different. The content of the word document would be the data provided in the issue.


The change request goes through an internal process in our company and would collect different data. At the end of the change request process, we would like to export the issue to a word document so that this exported document can be used for the approval by signature.


Is there a way to change the format of the exported word file based on the issue type?

3 answers

1 accepted

0 votes
Answer accepted
francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 3, 2012

I'm always using the java provided interfaces as documented here

http://docs.atlassian.com/jira/latest/com/atlassian/jira/issue/Issue.html

Also, the existing .vm templates are a tremendous source of inspiration :-)
To access the name of the issuetype use something like
$issue.getIssueTypeObject().getName()

Francis

Benny Varughese April 3, 2012

Thank you very much

0 votes
mwarton
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 2013

A new plugin Intelligent Reports has been released that gives a simple solution. Format your template in Microsoft Word, use point and click rules to determine which issue fields to place where in the document, and then generate.

It uses native word formatting rather than converting from HTML using a velocity template.

You can create as many different export templates as you need, and use the appropriate one for each issue type.

https://marketplace.atlassian.com/plugins/com.clariostechnology.intelligentreports

Rob_Woods November 13, 2019

What do you mean when you say "for each issue type"?  Is there a way, for issues, that you can have multiple reports available in the Export dropdown?  Like right now there is Export PDF, and then some other options.  Is it possible to add a new Item in the dropdown, something like "Export CR report"?

0 votes
francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 2, 2012

yes, you can

Actually the word file is generated using a velocity template which can be found under
.../atlassian-jira/WEB-INF/classes/templates/plugins/issueviews/single-word.vm

Note that the vm file needs to be adapted again when you upgrade jira. You might
also look at other solutions (like generating a report using birt / iReport or creating a
custom report)

Francis

Benny Varughese April 3, 2012

Thanks Francis

I am not familiar with velocity. I need to dig into it.

Could you give me a hint how to differentiate between the issue types? Would I use something like $issue.type?

Thanks a lot

Benny

Suggest an answer

Log in or Sign up to answer