Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Summary

Scriptlets are used to provide pre-defined sections of Html content for Ad-Hoc notifications and are able to retrieve values from most all Jira Fields.

How Jira Fields

...

values are retrieved

Most Jira Fields can be accessed by using $issue.getField(). However, Custom Fields require $issue.getCustomFieldValue("customfield_10116") to gather their values. As the Custom Field Id’s are used to find the Custom Field value, it means that they will need to be changed within the Scriptlet to work within your Jira instance.

Example Scriptlet

This Scriptlet example gathers all of the Jira Field values and displays them in a format that is similar to the Jira Issue Page. There are This Scriptlet has two features that have been implemented within this Scriptlet to restrict any unnecessary content from being shown within the Ad-Hoc notification:

  1. Check if Fields are empty.

...

  1. Fields will not be shown when they are empty.

  2. Check if comments are internal comments. If they are internal comment then they will not be shown. (This only applies to Jira Service Desk Projects).

Info

For the Request Participant and Organisation fields to be shown, the Custom Field Id’s must be changed within the Scriptlet to match your Jira instance. Custom Fields that are created by users will not be gathered by this Scriptlet and would require further configuration.

...

Example Scriptlet File

View file
nameJEMH_Example_Scriptlet.xml

...