Forums

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

Checking text in a linked issues summary before cloning an issue

Andrey Mayskiy December 22, 2021

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.

1 answer

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
January 9, 2022

Hi @Andrey Mayskiy

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:-

link_type.png

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 

Andrey Mayskiy February 3, 2022

Hi @Ram Kumar Aravindakshan _Adaptavist_ 

 

Thanks for your answer, but it's not work for me...anyway I did workaround directly in workflow.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.13.7
TAGS
AUG Leaders

Atlassian Community Events