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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.