Assume that we have 2 issue types A and B
A issue will link to more than one B issues ( 1 to many)
B issues will link to only one A issue (many to 1)
and the link between A and B is "is fixed by" and the link between B to A is "fixes".
How we can restrict the linking in edit screen such that A issue will link to more than one B issues and B issues will only link to one A issue. Could you please help me in this solution it will be helpful.
Thanks
Hi @thumuluru_shreya! ☀️
This kind of relationship (1 → many and many → 1) isn’t enforced out-of-the-box in Jira Cloud, but you can replicate the behaviour it by restricting linking behavior using automation rules:
Automation can't block linking on the edit screen, but it can reverse or flag unwanted links.
You can also look into ScriptRunner (Marketplace app) to add more control:
If you're open to custom development, Forge apps can be used to hide or restrict the link field entirely based on conditions.
There’s no direct way to enforce this at the UI level in Jira Cloud, but these workarounds can help 😊
Hi @Brita Moorus , Could you please help me in script runner or automation on how to approach this. Because we are using these apps in our project. It will be helpful
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Brita Moorus , For me this requirement is very crucial to achieve. Could you please help me in this to solve this one.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @thumuluru_shreya! 😊
Thanks again for your question - I tested this out using Automation Rules, and here’s what I found:
Unfortunately, Jira Automation doesn’t allow us to remove just the most recently added link - it can only remove all links of a given type, which isn’t ideal in this case. 😕
However, a good workaround is to inform the user with a comment when an invalid link is added.
Here’s how the rule can be set up:
🔹 Trigger: When an issue is linked, and the link type is "Fixes"
🔹 Condition: The number of issues linked via "Fixes" is greater than 1
🔹 Action: Add a comment to the issue, like this:
⚠️ This issue is already linked to another issue using the "fixes" relationship.
Only one "fixes" link is allowed per B-type issue. The newly added link to {{destinationIssue.key}} from {{triggerIssue.key}} is not valid.
👉 Please review and remove any duplicate links.
🛠️ If needed, you can make the rule even more precise by adding conditions to validate the issue types involved - for example, checking that the issue being linked from is type A and the one to is type B. This helps avoid false positives and ensures the rule only triggers in the right situations.
I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.