Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contents

Table of Contents
maxLevel2

1. Some variables do not render if I use styles on them in the Word templates

...

Inside the DOCX templates you can use all variables but  but ensure that you do not apply any styles styles to them. The reason is that a Word application can escape certain parts of the variable name with certain tags and the PDF app then will not be able to evaluate such a variable. For instance, $issue.key will  will be evaluated as a task's key, but if you apply a style to certain part of it ($issue.key) then the PDF application will keep this variable as is and will not substitute its value in the result document.

...

To fix this, cut an evaluating expression to the clipboard, paste it to any text editor like Notepad for instance, copy the pasted value and paste it back to the Word document. By doing that you will reset all unnecessary text styles.

Important notes:

  1. Disable the spell checking in your Word template before saving and attaching the document.
  2. Use "Clear formatting” (CTRL+SPACEBAR to reset style) for each expression you are evaluating within the docx template, because MS Word might set certain formats incorrectly.
  3. Do not apply formatting partially to such expressions. First you need to clear the old formats from the velocity expressions, then, if necessary, apply the new formats.

We plan to fix this inconvenience soon so, please, stay tuned.

Currently this is not possible but we plan to implement this feature so stay tuned. 

3. Special variables ($fieldRenderer.renderFieldById("..."), $fieldRenderer.renderField("<name>” etc.) to use in the template 

Edit with Notepad++ to change the template instead of MS Word and save like an open XML docx document for these variables to be working.

4. Encoding issue: how can I avoid "??" in the exported documents

Atlassian Atlassian recommends UTF-8 or Unicode encoding, and case-insensitive collation. In most cases, problems are due to a misconfiguration in one of the Jira components.
Thus you should use the UTF-8 character encoding across the database, application server, and web application.

To do that:

  1. On the System info page page of the admin console, check your System Encoding option, it should be "utf-8". This should fix the problem with encoding. You can change encoding via JAVA_OPTS variable or by adding the URIEncoding="UTF-8" attribute to the Connector tag in your server.xml of tomcat, or directly in the database.
  2. Ensure that the webwork.i18n.encoding property is set to "UTF-8" in the System info page of Jira admin. If the value of this property differs from UTF-8, perform the following changes:
    1. find webwork.i18n.encoding and set it to "UTF-8" in $JIRA_INSTALL/atlassian-jira/WEB-INF/classes/webwork.properties.
    2. jira-application.properties
    3. directly in the database:
      •  select id from the property entry where the the property_key='webwork.i18n.encoding'.
      •  update propertystring set propertyvalue = 'UTF-8' where id in (select id from propertyentry where property_key='webwork.i18n.encoding').
  3. Ensure that in the System info page of Jira Administration, the file.encoding and sun.jnu.encoding properties are set to "UTF-8" as well. 
    To change them, set the environment variable JAVA_OPTS as: 
    export JAVA_OPTS=-Dfile.encoding=utf-8 -Dsun.jnu.encoding=UTF-8 $JAVA_OPTS
  4. Restart Jira.
  5. Check Check conf/server.xml. Find where the Coyote HTTP Connector is defined (i.e. <Connector port="8090"/>). 
  6. Add a URIEncoding="UTF-8" property to the connector: <Connector port="8090" URIEncoding="UTF-8"/>.
  7. If you are using mod_jk, apply the same URIEncoding parameter to the AJP connector and add the following option to your Apache mod_jk configuration: 
    <Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8"/>.

...