Use cases
Find your goal in the table and follow its section. The examples use two projects, Mobile App (MOB) and Web Portal (WEB).
| Use case | Settings | Set up by |
|---|---|---|
| Allow only selected link types | Link rules, general model | Project administrator |
| Let only one group use a link type | Link rules, access to a link type | Project administrator |
| Allow links only to selected projects | Link rules, project restriction | Project administrator |
| Make users link only through the app | Technical account, permission scheme | Jira administrator |
| Add a field for another team's blockers | Picker field that holds many issues | Jira administrator |
| Keep exactly one linked issue | Picker field that holds one issue | Jira administrator |
| Choose links when creating an issue | Fields on the create screen | Jira administrator |
| Link new issues from Jira Automation | Automation rule with a picker or the Links field | Jira administrator |
| Check who changed links | None, the activity log is on by default | No one |
Allow only selected link types
In MOB, people should link issues only with Blocks ("blocks", "is blocked by") and Relates ("relates to"). Duplicate, Cloners, and any other link type shouldn't be offered.
As a project administrator of MOB:
- Select Project settings (Space settings in the new Jira navigation), then Apps, then Issue Link Guard.
- On the General tab, turn on Control enabled for this project.
- Select the Link type rules tab. Leave Control mode on General model (default).
- Select Other link types (N) and turn on Allowed for Blocks and Relates. Both move to the Allowed link types table. Leave Allowed off for the other link types.
- Next to Blocks, select Edit, choose Everyone, select Add, then Done. Do the same for Relates.
- Select Save under the Allowed link types table.
Step 5 is easy to miss. A type you've just allowed has nobody in its access list, so nobody can use it yet. Its Who column shows "No recipients selected."
After you save, the link window, the Links field, and the link type list on the create screen offer only "blocks", "is blocked by", and "relates to". A picker field with a blocked link type becomes read-only and shows "You are not allowed to use this link type in this project."
Jira's own Linked work items section still accepts any type from people who have Link Issues. Make users link only through the app closes that gap.
Let only one group use a link type
In MOB, only the support team should mark issues as duplicates. Blocks and Relates stay open to everyone, as in the previous use case.
On the Link type rules tab of MOB's Issue Link Guard settings:
- Select Other link types (N) and turn on Allowed for Duplicate.
- In the Allowed link types table, next to Duplicate, select Edit and choose Group. Type
support-team, select the group, then select Add and Done. The Who column shows Group: support-team. - Select Save under the table.
Anna, a member of support-team, now sees "duplicates" and "is duplicated by" in the link window. Other users don't, and the server refuses the link if they try anyway. A Project role, such as Administrators, or a few selected users work the same way. See Choose who can use a link type.
Allow links only to selected projects
MOB issues should be linked only to issues in MOB and WEB, with any link type.
In MOB's Issue Link Guard settings:
- On the General tab, turn on Control enabled for this project.
- On the Link type rules tab, in Control mode, choose Project restriction.
- Under Allowed target projects, add WEB.
- Select Save at the end of the tab.
The issue search in the link window and in the app's fields now offers only MOB and WEB issues. Link types aren't checked in this mode. If one link type should point only to one project, a picker field with a JQL filter does that, as in Add a field for another team's blockers.
Make users link only through the app
To make MOB's rules binding, take Link Issues away from regular users. The app's account then creates the links the rules allow, and nobody can work around the rules in Linked work items.
Set the link rules first, as in one of the use cases above. With control off, or in the Project restriction mode, the technical account creates links of any type for everyone who can edit an issue.
As a Jira administrator:
- Select Jira admin settings, then Marketplace apps, then Issue Link Guard, then Technical account.
- Next to MOB, select Set up….
- Check step 1 of the dialog. If the app's account doesn't have Link Issues in MOB, select Grant the permission to the technical account.
- Select Turn on the technical account.
- In MOB's permission scheme, remove Link Issues from the groups and roles of regular users. Keep the entry for the project role
atlassian-addons-project-access.
If other projects share MOB's permission scheme, step 5 changes them too. To change only MOB, give it its own permission scheme first.
From then on, Jira's History shows the app as the author of these links, and the activity log shows who asked for each one. People who can only view issues can't link yet. To let them link from the side panel, see Technical account.
Add a field for another team's blockers
MOB issues often wait for work in WEB. A "Blocked by" field on MOB issues should offer only WEB issues and hold several of them.
As a Jira administrator:
- In Jira admin settings, select Work items, then Fields, and create a field of the type Issue Link Guard – Picker named "Blocked by".
- Add the field to the screens MOB uses.
- In a context of the field that covers MOB, select Edit custom field config.
- In Link type, choose "is blocked by". In JQL, enter
project = WEB. - Leave Allow multiple issues on and select Save.
If control is on in MOB, Blocks has to be allowed for the people who use the field.
The field's search finds only WEB issues, and each pick creates the link straight away. For unfinished work only, change the JQL to project = WEB AND statusCategory != Done.
Links of the same type made elsewhere, for example in the link window, don't show up in this field. See A picker shows only its own links.
Keep exactly one linked issue
A "Duplicate of" field on MOB issues should point to one issue at most. Picking another issue replaces the link instead of adding a second one.
Set up the field as in the previous use case, with these values in its context:
| Setting | Value |
|---|---|
| Link type | "duplicates" |
| JQL | project = MOB |
| Allow multiple issues | Off |
If Duplicate is limited to support-team, as in Let only one group use a link type, the field is read-only for everyone else. Sometimes you want everyone to set "Duplicate of" while Duplicate stays hidden in the link window. For that, turn on Ignore project link rules in the field's context. The app's account then creates these links, so it needs Link Issues in MOB. See Ignore project link rules.
Choose links when creating an issue
People who create MOB issues should set their links in the create dialog, not by opening the issue again.
As a Jira administrator, add the Links field, a picker field, or both to the screen MOB uses for creating issues. The field configuration alone isn't enough.
On the create screen, the Links field offers the same link types as the link window. The links appear a few seconds after the user selects Create. A link that can't be created shows up as a warning, with the reason, in the new issue's activity log.
Without the technical account, the person who creates the issue needs Link Issues, unless a picker uses Ignore project link rules. The details are in the create screen sections of Links field and Picker fields.
Link new issues from Jira Automation
When a WEB issue moves to In Progress, a rule should create a MOB issue that is blocked by it. The rule fills the "Blocked by" picker from Add a field for another team's blockers.
As a Jira administrator:
- Make sure the "Blocked by" field is on MOB's create screen.
- Create a rule whose scope includes WEB and MOB.
-
In the rule's Create work item action, select More options. In Additional fields, enter this JSON, with your field's ID instead of
customfield_10076:{ "fields": { "customfield_10076": ["{{triggerIssue.key}}"] } } -
Save and turn on the rule.
The app checks the project's rules for the rule's actor, Automation for Jira by default, and creates the link shortly after the issue. Set the picker from Jira Automation shows where to find the field's ID and how to link several issues.
For links of different types from one rule, set the Links field instead, with entries such as 10000:inward:{{triggerIssue.key}}. See Set links from Jira Automation.
Don't use Automation's own Link work items action for this. Its links skip the project's rules and the activity log.
Check who changed links
There's nothing to set up. Open an issue and, in Activity, select the Issue Link Guard tab.
The tab lists only links made through the app. Once regular users can link only through the app, as in Make users link only through the app, that covers all of their links.
To change how long entries are kept, anonymize them, or turn the log off, see Data and privacy.