Dependant fields depend on issue-values (other custom fields for example). They get updated whenever an issue is created or changed.

Configuration of a dependant field is done in 3 steps:

  • Select & filter the data source

  • Prepare the value

  • Select a target field that holds the result

Select the source

In the following we will use a data source with this JSON result

{
  "userlist": [
    {
      "id": 1,
      "name": "Mario Speedwagon",
      "username": "mario"
    },
    {
      "id": 2,
      "name": "Anna Sthesia",
      "username": "anna"
    }
  ]
}
CODE

Context filter

The context filter allows you to select the correct segment of data based on issue values. This is useful in case you have a single JSON result for all issues. The context filter helps you drill down to the entry that you need information from.

More examples and details about context filters can be found in the dedicated documentation section Context Filter

Available Issue Values

  • Issue Key: $.issue.key

  • Issue Id: $.issue.id

  • Project Key: $.issue.fields.project.key

  • Project Name: $.issue.fields.project.name

  • Custom field - Text: $.issue.fields.customfield_10XXX

  • Custom field - Select list: $.issue.fields.customfield_10XXX.value

  • Custom field - Asset field $.issue.fields.customfield_10XXX[0].originId

  • Organizations - Jira Service Management - $.issue.fields.customfield_10XXX[0].name

  • Assignee Account Id: $.issue.fields.assignee.accountId

  • Creator User Key: $.issue.fields.creator.key

  • Creator Display Name: $.issue.fields.creator.displayName

Lets assume there is a custom field (customfield_10010) that contains the username which would result in the following context filter

$.userList[?(@.username=='{$.issue.fields.customfield_10010}')]
CODE

This way your data selection depends on the value of the customfield_10010 of each issue.

Simulating the result

After entering values the simulation starts with the most recent changed issue in your Jira cloud instance. In case you need a different Issue to the this on you can change the issue that is used in simulation.

Value Type

The Value Type defines what kind of data you are writing. See Select a target field to see which value type works with what kind of target field.

  • Text

  • TextArea

  • Number

  • Url

  • DateTime

  • UserPicker (must be the Jira accountID of the user you want to select)

  • MultiUserPicker (must be the Jira accountID of the user you want to select)

  • Select List (must be the same value as in the dropdown list)

  • Asset Field (must be in the format appKey/originId)


Select Value

To insert only part of the JSON result you have to select which part of the JSON should be inserted. In the example above a value of

$.name
CODE

will result in Mario Speedwagon.

You can also use pre and postfix around the value from your datasource like this:

prefix__{$.name}__postfix
CODE

This will result in prefix__Mario Speedwagon__postfix


Select a target field

Select the custom field of your choice. The type of the custom field should fit the value type of the previous step. Valid combinations are:

Text <-> Text Field | Text Area | Url
TextArea <-> Text Area
Number <-> Number
Url <-> Url | Text Field | Text Area
DateTime <-> DateTime
UserPicker <-> UserPicker
Select List (single choice) <-> Select List
Asset Field <-> Asset Field
CODE

Update Condition

Select one of 3 options to control when the dependant field gets updated

  • Always

  • Once after issue creation

  • Only if target Jira field is empty

Always (default)

This option will trigger an update after the creation of an issue and after every issue update

Once after issue creation

This option will trigger only once after creation of an issue. Make sure the dependant value is available after the issue is created to make this work.

Only if target Jira field is empty

This option will trigger always as long as the target field is empty


Clear Values

If activated, the target field will be cleared in case of an empty result or a missing dependency.

No Issue Refresh

If activated, this field will not trigger an issue page refresh after a value changed. An issue page refresh is useful if the target field is present on the issue view.

Order

Defines in ascending order the processing when using multiple dependent fields. This is especially useful if multiple dependant fields have dependencies setup between them.