Customise word export template for Jira applications

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Background

This KB article outlines how to customise the output from JIRA applications while exporting issues to Word documents.

Resolution

The content on this page includes steps to customize or extend Atlassian software (adding/changing CSS rules, HTML, JavaScript, etc.). Per the Atlassian Support Offerings, support does not include customizations made to Atlassian products. Be aware that this material is provided for your information only and using it is done so at your risk.

If you have any questions about this or any customization, please ask the community at Atlassian Answers or consider working with an Atlassian Solution Partner.

  1. The output of word export is controlled by the four velocity templates located at atlassian-jira/WEB-INF/classes/templates/plugins/issueviews located under Jira applications Installation Directory. 
    1. single-word-css.vm - Defines the html styles used for export
    2. single-word-header.vm - Defines the header part of the exported document
    3. single-word.vm - The content part of the exported document
    4. single-word-footer.vm - The footer part of the exported document
  2. Open these files in your favorite text editor and make the required changes and save it.
  3. Restart the application.

There is a feature request for this functionality to be handled within the core of Jira applications, as tracked at: JRASERVER-12813 - Export to Word: more control

Example: Changing Word Export to A4 size

  1. Access single-word-css.vm.
  2. Open in a text editor and Add the following css under <style type="text/css">:

    @page
    {
    /The A4 paper size is 210 mm wide by 297 mm long/
    size: 210mm 297mm!important;
    }

  3. Save and restart your JIRA application.


Last modified on Jan 27, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.