Forums

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

Groovy Condition doesn't work

Ysaac James Salao August 1, 2018

The updating of the field value is working when there's no condition involved. 

Unfortunately, it doesn't work when it has. 

This is my current code. 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLink
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue;

def issueLinkManager = ComponentAccessor.getIssueLinkManager()

issueLinkManager.getOutwardLinks(issue.id).any{it.destinationObject.getProjectObject().getKey()== 'PROJECT NAME'}

 

Thanks!

1 answer

1 vote
Tansu Akdeniz
Community Champion
August 1, 2018

Hi @Ysaac James Salao,

issue.getProjectObject().getKey() returns the key of the project, not the name.

Suggest an answer

Log in or Sign up to answer