Forums

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

how to avoid issue linking of same issue type?

gagan m s February 21, 2019

hello ,

im trying to create a script where it avoids/ deletes if two issues of same issutype is linked.

can i do this using scriptrunner?

1 answer

0 votes
Tarun Sapra
Community Champion
February 21, 2019

Hello @gagan m s 

If the user is trying to link an issue to another issue via the create issue form then you can add a check in the validation phase of the create transition and easily avoid linking of the issue types of same type.

gagan m s February 21, 2019

Hello @Tarun Sapra ,

its not only during creation, we should be able to restrict at any point of time.

Tarun Sapra
Community Champion
February 21, 2019

Then you can try using the behaviour modeul of the SR plugin which works on create and edit screen.

https://community.atlassian.com/t5/Answers-Developer-Questions/Behaviour-plugin-to-restrict-linkedissue-types/qaq-p/536508

def links = getFieldById("issuelinks")
def linkissue = getFieldById("issuelinks-issues")
def linktype = getFieldById("issuelink-types")

And then based on the selection you can check for the issueType and then call setError() on the field

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events