$customHeader
Skip to end of banner
Go to start of banner

Issue Context and Default Script Context

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Issue Context

A fundamental concept in creating scripts for Jira is the issue context. When a script references custom fields, the issue context can either be implicitly 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, as in the example below.

Example Code

string value = #{custom field name};

Setting the Issue Context With the Default Script Context

When running scripts from the SIL Manager, you can use the Default Script Context setting. This allows you to set the context of your script so that it runs exactly as it would in an automated setting. To set the Default Script Context, follow these steps:

  1. Select Run > Default Script Context.

  2. Enter the issue key of the issue you want to test on.

Note: Leave the Issue Key field empty if you don't want to run the script in an issue context.

Explicit Context

You can create an explicit reference to the issue context by entering key before the custom field.

Example Code

string value = key.#{custom field name};

Additional Help

For support implementing this script, use the bot on this page. 

Filter by label

There are no items with the selected labels at this time.

  • No labels