The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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.