Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict Linked Issues to the Project they're created in

Jordan Kleeman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 7, 2023

We have multiple active Projects. When creating an Issue, the Linked Issues field will populate suggestions from all of our Projects. We'd like to restrict this to only suggest Issues from the current Project, just as the Sprints field has an 'Only Show Sprints in this Project' toggle.

2 answers

1 accepted

0 votes
Answer accepted
Alex Koxaras -Relational-
Community Champion
April 7, 2023

Hi @Jordan Kleeman 

You can't restrict the users (in cloud), to choose only from a specific project. However, what you could do, if you have an app like JMWE, JWT, Scriptrunner, JSU etc, then:

  • If the users are linking issues via a transition screen, to allow that transition only if the linked issues belong to the specific project.
  • If the linked issues is available on the edit screen, to possibly add an event when the linked issues are changed, and to validate that the linked issues belong to the specific project. If they are not, then erase the linked issue. This is not the best approach, since the user might be a bit confused about why his linked was erased, but it is a viable solution.

There is an open suggestion here https://jira.atlassian.com/browse/JRACLOUD-9634 which you can vote and watch. There was also the newer suggestion here https://jira.atlassian.com/browse/JRACLOUD-36494, but the older one (9634) is the one to follow.

Vicente Domínguez [Decadis AG]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2023

Hi @Jordan Kleeman and thank you again @Alex Koxaras -Relational- for mentioning us!

I am part of the Support Team of Decadis and I will gladly help you with the alternative solution that @Alex Koxaras -Relational- proposed using Jira Workflow Toolbox for Jira Cloud.

It would be possible to validate during a transition if all of the linked issues of the transitioned issue are in the project of the transitioned issue with a Jira expression validator. It would only be necessary to enter the following expression to set it up:

issue.links.every(l => l.linkedIssue.project.key == issue?.project?.key)

Some more use cases for our Jira expression validator can be found in our documentation, namely in the page Jira expression condition/validator (use cases).

Please, let us know if you need further assistance in this thread or via our Support Service Desk.

Best regards,

Vicente

Like # people like this
0 votes
Matt Doar
Community Champion
April 7, 2023

If you use subtasks they all have to be in the same project as the parent issue. But they are only 1:N not N:M

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events