Hi Community!
I'm trying to use Scriptrunner Listener "Clones an issue, and links" with condition that checking specific word in a linked issues summary to avoid duplicates:
!issueLinkManager.getOutwardLinks(issue.getId()).any{
it.destinationObject.getSummary().contains('QA')
}
But condition is not working. What I'm doing wrong?
Thanks in advance.
You will need to check a few things. Firstly is the link that is added to the issue an InwardLink or an OutwardLink.
To find what type of link is added to the issue, you can refer to this page in your Jira instance
<JIRA_HOME>/secure/admin/ViewLinkTypes!default.jspa
On this page, you should see something like:-
From here you can double-check what are the link types that are added to the issue.
Next, when you are doing your validation, instead of using ! option on the outermost section of your question, you could instead try:-
issueLinkManager.getOutwardLinks(issue.getId()).each {
if(!it.destinationObject.getSummary().contains('QA')) {
// create the link
}
}
I hope this helps to answer your question. :)
Thank you and Kind Regards,
Ram
Hi @Ram Kumar Aravindakshan _Adaptavist_
Thanks for your answer, but it's not work for me...anyway I did workaround directly in workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.