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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.