Modifying display templates

This guide walks you through the process of modifying the display templates.

Default templates

The templates are empty by default and have the following default display values for the different fields:

Field Name

Default Display

Field Name

Default Display

Remote System Reference

Link to the object, displaying in the format "<Object ID> - <Object name>"

Remote Object Link

Link to the object, displaying in the format "<Object ID> - <Object name>"

Multi Remote Object Link

Same as Remote Object Link except more than one, each on each on a new line

Remote Issue Link (for Connector version 5.1)

Link to the object, displaying in the format "[<Connection Name>] <Object Name>"

Modifying the custom field template

The display can be marked up or the contents customized by editing the custom field templates. The templating syntax is Velocity and also supports HTML.

Those with some basic programming background should be able to learn Velocity for maximum flexibility in data display, however it is understood that not all administrators would have the time to do so

A quick template that will display the values of all fields can be copied and pasted from below:

|| Field || Value || #foreach ($entry in $fields.entrySet()) | $entry.key | $entry.value | #end

To apply this to a Jira custom field:

  1. Go to the Administration section of the application and enter your password if prompted.

  2. Click on the Custom Fields link in the Issue Fields section of the left menu. 

  3. Find the field you want to add a template for and click on the Configure link.

  4. To differentiate the Custom field, check the name under the mappings. For example, the mapping is called "Test SF Opportunity Mapping". the Custom field will be "Test SF Opportunity Reference". Also, in the Custom Field section, the field will read - (Object) Reference, Read-Only, Do not delete)






  5. If this is the first time on this screen for this custom field then the template will be empty by default.
    Click on the Edit Template link.





  6. You will be taken to a form with text areas for a header, template and footer.
    In our example we won't worry about the header or footer. We will paste in the above code into the template area.
    Do this and click Submit.
     

  7. You will be taken back to the configuration screen for this field and the Body section should now have our code:





  8. How does it look in the Jira issue? See below (there were too many fields to display in full!)
    Note that if the issue wasn't created from Salesforce then you will need to link it manually.





  9. You can also select the Merge Table option:




    This option allows for better table formatting which results in fields will being displayed more nicely:



    Merge Table: Enabled



    Merge Table: Disabled

For more advanced templating features, please see Customizing advanced field templates.

Modifying the Remote Issue Link template

Customizing the display for Remote Issue Links is very similar to Modifying the Custom Field Template. The instructions are almost the same except for where to put the customization.

Note that for the remote issue links, customizing the display supplements the default data. The default data cannot be removed or changed.

  1. Go to the Administration section of the application and enter your password if prompted.

  2. Click on the Remote Issue Links link in the Cloud Connectors section of the Add-ons menu.





  3. Expand the connection that has the object you wish to configure.





  4. Click on Config in the Actions column for that object.

  5. The next screen will have a Display Template text area for you to place your custom template, same as for the template areas in custom fields.
    Like those areas, this field accepts wiki markup and you may reference the Salesforce attributes of the object by using the notation in Modifying the Custom Field Template.
    In the example below, an email address has been pulled from Salesforce in addition to the user name.





  6. When finished, click Save.
    Using the example in the previous step, the resulting issue link in a Jira issue looks like the following:


What's next?

You can now start: