Versions Compared

Key

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

Issue Context

When A fundamental concept in creating scripts for Jira , one of the most fundamental concepts is that of is the issue context. When a script makes reference to references 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:, as in the example below.

Example Code

Code Block
string value = #{custom field name};

Setting the Issue Context With the

...

Default Script Context

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

...

Click on the "Run Configuration" button.

...

  1. Select Run > Default Script Context. The Script context configuration window opens.

  2. Enter the issue key of

...

  1. the issue

...

  1. you

...

  1. want to test

...

  1. .

  2. Select OK.

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 placing "key" in front of entering key before the custom field.

Example Code

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

Additional Help

Need help For support implementing this script? Talk to me directly to me by clicking on , use the bot on this page. 

Filter by label (Content by label)
page
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@135a7
showSpacefalse
sortmodified
showSpacetypefalsepage
reversetruetype
labelskb-how-to-article
cqllabel = "kb-how-to-article" and type = "page" and space = "PKB"labelskb-how-to-article
Page Properties
hiddentrue

Related issues