Link issue condition

JIRA Admin October 29, 2019

Hey,

I would like to set a condition on JIRA for the linked issues. For example, I link a issue(A) from one project to another project's issue(B). I want to set a condition in which if the status of the linked issue(A) is in "Backlog" and the other issue(B) is also in "backlog". If I want to move issue B from Backlog to Dev completed but this transition should not happen until issue A is moved to the completed state. Please help me with a solution to this.

1 answer

0 votes
Tansu Akdeniz
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 30, 2019

Hi @JIRA Admin ,

If you have a Script Runner add-on, you can do it with a custom script.

You can put a script condition to Backlog -> DEV step in a workflow of issue B. It checks whether linked A issue is completed or not. If issue A is completed, button will be visible in issue B.

Sample code; (I assume you linked issue from A to B). You can customize it.

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

passesCondition = true;

def issueLinkManager = ComponentAccessor.getIssueLinkManager()
for (IssueLink link in issueLinkManager.getInwardLinks(issue.getId())) {

def destIssue = link.getSourceObject();

if(!destIssue.getStatusId().equals("10000")){ //Ex Status id of DONE
passesCondition = false;
}
}

Regards

JIRA Admin October 30, 2019

Is there any other way than using a Plugin

Suggest an answer

Log in or Sign up to answer