Issue Context and Run Configuration
Issue Context
When creating scripts for Jira, one of the most fundamental concepts is that of issue context. When a script makes reference to custom fields, the issue context can either be implicitly defined or explicitly defined.
Implicit Context
Whenever a script is run from an automated context such as a workflow or listener, the issue context is provided. For example:
Example Code
string value = #{custom field name}; |
Setting the Issue Context With the Run Configuration
When running scripts from the SIL Manager, a useful feature you can use is the Run Configuration setting. This allows you to set the context of the script so that your script runs exactly as it would in an automated setting. To set the Run Configuration, follow these steps:
Click on the "Run Configuration" button.
Click on the "Provided context" radio button.
Enter the issue key of an issue for which you would like to test against.
Explicit Context
You can create an explicit reference to the issue context by placing "key" in front of the custom field.
Example Code
string value = key.#{custom field name}; |
Additional Help
Need help implementing this script? Talk to me directly to me by clicking on the bot on this page.Â
Related articles
Filter by label
There are no items with the selected labels at this time.