Picker fields
A picker field links issues with one fixed link type, for example "blocks", and offers only the issues that match a JQL filter. Users pick issues and never choose the link type. A picker can hold one issue or many.
Typical uses are a "Blocked by" field that offers issues from one team's project, a "Parent request" field that holds exactly one issue from a service project, and a "Related incidents" field limited to open incidents. The examples on this page use a "Blocked by" picker (link type "is blocked by", JQL project = WEB) on issues of the Mobile App project (MOB).
Add a picker field
As a Jira administrator:
- In Jira admin settings, select Work items, then Fields.
- Create a custom field of the type Issue Link Guard – Picker. Give it any name, for example "Blocked by".
- Add the field to the screens the project uses.
- Configure the field's context, as described in the next section.
A field appears on issues only when it's on the project's screens. Until you configure it, the field shows "This field is not configured yet".
Configure the field
A field's context sets its link type and JQL filter. A field can have several contexts, so the same field can use a different link type or JQL in different projects.
To configure a context, as a Jira administrator:
- Open the field's Contexts and, for the context, select Edit custom field config.
- In Link type, choose the link type, including its direction, for example "blocks" or "is blocked by".
- Optionally, enter a filter in JQL. Only matching issues can be selected. Don't use
ORDER BY. - Optionally, select Preview JQL to see about how many issues match and a few examples.
- Set the options described in the table below.
- Select Save.
The JQL preview counts issues for your account. Other users see only the issues they have access to.
| Option | Default | Effect |
|---|---|---|
| Allow multiple issues | On | On: the field holds up to 100 issues. Off: the field holds at most one issue, and picking another one replaces it. |
| Ignore project link rules | Off | See Ignore project link rules. |
Pick issues
On the issue view, the field shows its issues as tiles with the issue type icon and key. Select a key to open the issue.
To add a link:
- Select the field.
- Search for an issue and pick it.
The link is created straight away. The search offers only issues that match the field's JQL and that you can see.
To remove a link, select the field, then select × on the issue's tile. The link is removed straight away.
On the create screen, pick issues in the same way. The links are created a few seconds after the issue is saved. See Pick issues on the create screen. A Jira Automation rule can fill the picker too, see Set the picker from Jira Automation.
Pickers that hold one issue
A picker with Allow multiple issues turned off, for example a "Duplicate of" field, always shows at most one issue: the last one picked.
Picking another issue replaces the current one. If the current link can't be removed, for example because its project is no longer an allowed target, nothing changes and the field shows "Can't replace …: reason".
If the linked issue is deleted, Jira removes the link and the field becomes empty. It doesn't fall back to an older choice.
A picker shows only its own links
A picker shows and removes only the links that were added through that field. Links of the same type made with the links field, the side panel, or Jira's own linking don't appear in the picker. They stay visible in Jira's Linked work items section, and the picker can't remove them.
This keeps two pickers with the same link type, for example "Blocked by (team A)" and "Blocked by (team B)", from showing each other's issues.
Links of the same type that existed before the picker was set up aren't on its list either.
What is always checked
These checks apply in every project, whatever its settings.
- The link type and its direction come from the field's configuration.
- The field's JQL decides which issues can be picked. The server checks it again when the link is saved.
- The user must be able to see the target issue. Issues they can't see aren't offered and can't be linked.
- If the project uses project restriction, its list of allowed target projects applies, even with Ignore project link rules turned on.
- Removing a link is checked like creating it. A user who couldn't create the link can't remove it.
- Without an active license, the field is read-only.
Who can use the field
A picker follows the project's link rules, like the link window. In this example, Anna edits MOB-2 and picks WEB-3 in the "Blocked by" picker:
- If control is on in MOB, "is blocked by" must be allowed for Anna. Otherwise the field is read-only and says that Anna isn't allowed to use this link type.
- If MOB uses the technical account, the app's account saves the link, and permission to edit MOB-2 is enough. Without it, Anna needs Link Issues.
- If MOB uses Project restriction, link types aren't checked, and the search offers only issues from MOB and its allowed target projects.
A field with Ignore project link rules skips the link rules and always saves links with the app's account. For which account saves each change, see Technical account.
Ignore project link rules
With Ignore project link rules turned on, the field links with its link type even when the project's rules don't allow that type, or don't allow it for that user. Use it when a link type should be blocked in general but still settable through one controlled field.
- Links are always created and removed by the app's account, even if the project doesn't use the technical account. The app's account needs Link Issues in the project.
- The user doesn't need Link Issues. Permission to edit the issue and to see the target issue is enough.
- The field's JQL and the project's target-project restriction still apply.
- The link window and the links field aren't affected and keep following the project's rules.
Because a Jira administrator sets this option, it overrides rules set by project administrators. While control is on, the General tab of their project settings lists such fields under Picker fields that ignore the link type rules.
Pick issues on the create screen
On the create screen, pick issues in the picker as on an existing issue, then select Create. The links aren't created together with the issue:
- Jira creates the issue.
- A few seconds later, the app checks the same conditions as on an existing issue, for the person who created the issue.
- The app's account creates the links, because no user is signed in at that point.
Without the technical account and without Ignore project link rules, the person who created the issue must have Link Issues, or the link isn't created. If a link can't be created, the new issue's activity log shows a warning entry with the reason, as described in Links field.
A picker that holds one issue takes only one picked issue.
Set the picker from Jira Automation
An automation rule (a flow in the new automation editor) can fill a picker when it creates an issue. A few seconds after the issue is created, the app creates the links, as it does for an issue created on the create screen. This works for pickers that hold one issue and for pickers that hold many.
Picker fields aren't listed among the fields of the Create work item action, so you set them with JSON.
To set a picker in a rule:
- Find the field's ID. In Jira admin settings, select Work items, then Fields, and select the field's name. The page address ends with
fieldId=customfield_and a number, for examplefieldId=customfield_10076. If you aren't a Jira administrator, ask one for the ID. - In the rule's Create work item action, select More options.
- In Additional fields, enter the JSON from one of the examples below, with your field's ID instead of
customfield_10076. - Save the rule.
The field must be on the create screen of the project where the rule creates the issue. Its value is always a list of issue keys, also in a picker that holds one issue.
If the rule creates the issue in a different project from the one it runs in, or looks up issues in another project, the rule's scope must include all of these projects. Only a Jira administrator can create rules for several projects.
Link one issue
To always link the same issue, enter its key in double quotes. Keep the square brackets, even for one key:
{
"fields": {
"customfield_10076": ["WEB-1"]
}
}
To link the issue the rule runs on, use the smart value {{triggerIssue.key}} instead of the key. For example, a rule runs on WEB-1 and creates an issue in MOB, and the new issue is blocked by WEB-1:
{
"fields": {
"customfield_10076": ["{{triggerIssue.key}}"]
}
}
Link several issues
To always link the same issues, list their keys in square brackets. Put each key in double quotes and separate the keys with commas:
{
"fields": {
"customfield_10076": ["WEB-2", "WEB-3", "WEB-4"]
}
}
To link issues found by a query, find them with a Lookup work items action placed before Create work item, and pass their keys with the smart value {{lookupIssues.key.asJsonStringArray}}. The smart value already returns a list, for example ["WEB-2", "WEB-3"], so don't put brackets or quotes around it.
For example, a rule that runs on MOB-5 has these steps:
- Lookup work items with the JQL
project = WEB AND key in (WEB-2, WEB-3). -
Create work item with this JSON in Additional fields:
{ "fields": { "customfield_10076": {{lookupIssues.key.asJsonStringArray}} } }
The new issue is blocked by WEB-2 and WEB-3. A picker that holds one issue takes only the first key, so turn on Allow multiple issues in the field's configuration.
Checks for the rule's actor
The app treats the rule's actor as the person who created the issue. By default, the actor is Automation for Jira; you can change it in the rule's Settings panel. The checks are the same as in Pick issues on the create screen:
- Keys that don't match the field's JQL aren't linked.
- The actor must be able to see the picked issues.
- The project's link rules apply to the actor. If the field's link type is allowed only for selected roles, groups, or users, the actor must be one of them, or the link isn't created.
- Without the technical account and without Ignore project link rules, the actor needs Link Issues.
The new issue's activity log shows the actor as the person who asked for each link, and a warning entry with the reason for each link that wasn't created. The rule's audit log doesn't show these refusals, because the app creates the links after the rule has created the issue.
For what rules can't do with a picker, see Limits and known limitations.
Messages
| Message | What it means |
|---|---|
| This field is not configured yet. | A Jira administrator has to choose a link type in the field's context configuration. The same message appears if the configured link type was deleted from Jira. |
| You are not allowed to use this link type in this project. | The project's rules don't allow the field's link type for you. |
| Can't replace …: reason | A picker that holds one issue couldn't remove the current link, so it didn't add the new one either. |
| Saved with a warning | The link was created, but something else failed, for example the field couldn't add the link to its list. The message says what failed. |
| This link was not added with this field, so it can't be removed here. | The link was made elsewhere. Remove it in Jira's Linked work items section or in the link window. |
Limits
| What | Limit |
|---|---|
| Length of the JQL filter | 2,000 characters |
| Issues picked in one field | 100 |
| Links remembered by one picker on one issue | 300 |