Dependencies on the issue context
The dependencies detailed in this page are specific to connected custom fields.
When fetching data from an external source, it can be useful to only retrieve data that is relevant to the current issue, even if it is still being created.
To do that, Elements Connect allows you to reference specific variables and attributes when setting up your query, which can be used to create dependencies to other Jira fields in the same context. This context can be the issue view, or even the issue creation screen.
Configuration
Before being able to use this type of dependency, you need to authorize it on your Jira instance for specific projects and issue types.
This can be done be following these short configurations steps.
1/ Go to Elements Connect in your instance
2/ Open the Settings page in the top menu
3/ Use the “Projects” option to select the projects where you want to enable the option, and click on the Add button when your selection is done (you can use the “All projects” option to do it faster!)
By default, all the issue types within a project are automatically selected. You can remove them if you don’t want the feature to be enabled in specific cases.
4/ Click on the Save button.
That’s it! Now you can create dependencies between connected custom fields and other fields in the creation screen or the main issue view of your Jira issues.
Supported fields
The table below lists all the fields that can be referenced in your queries, as well as the attributes you can use for these fields.
Field type | Available attributes | Value returned |
---|---|---|
Summary |
| Summary of the current issue |
Issue type |
| Name of the current issue type |
Priority |
| Priority of the issue |
Assignee |
| Email of the assignee on the issue |
| Atlassian account ID of the assignee of the issue | |
Reporter |
| Email of the reporter on the issue |
| Atlassian account ID of the reporter of the issue | |
Select List (single choice) |
| Displayed value of the option selected in the select list |
Text Field (single line) |
| Raw text value |
Usage
You can use these attributes to create dependencies in your connected custom fields queries to other Jira fields.
For example, you may want to create a dynamic query in a REST endpoint that returns only the data based on the issue type of your current issue.
API request
{BaseURL}/search?jql=issuetype="$issuetype"
In this request to the local Jira API, all the issues with the same issue type as the current issue are retrieved.
Known limitations
Value not selected in the connected custom field after a refresh
If you are using a connected custom field with a dependency, the option selected in the custom field will be automatically unselected if the value of the parent field changes.
For example, let’s say your connected custom field has a dependency to the summary of your issue, and that you have selected an option in your custom field.
If the value of the summary is updated, the options of your connected custom field will be automatically refreshed. Even if the value that was selected remains a valid option, it will not be selected anymore and you will have to select it once more manually.