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?
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.
Hello @Tarun Sapra ,
its not only during creation, we should be able to restrict at any point of time.
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
It looks like you're new here. Sign in or register to get started.