Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Checking text in a linked issues summary before cloning an issue

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

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 

Suggest an answer

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you