Hello All,
In our project there is an issue type called "Feature"(parent) it has 2 sub-tasks called "Development" and "Testing". Different workflows for 2 sub-tasks.
Development Sub-task statuses:
NEW, IN PROGRESS, READY TO TEST
Testing sub-task statuses:
NEW, IN PROGRESS, TEST PASSED, TEST FAILS
If "Testing" sub-task issue status moves to the status "TEST FAILS", Development issue status has to move to status "NEW" automatically.
Any help would be greatly appreciated!!
Thanks in Advance,
Bunty
There is the only option to change issue status: make a transition.
There is no buiid-in feature for this, since you should use an add-on like Script Runner.
Hi @Vasiliy Zverev,
Our Jira application is integrated with the Scrip runner add-on. Do you know any scripts?
Thanks,
Bunty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This question was asked make times here, see this for example: https://community.atlassian.com/t5/Jira-Core-questions/Script-Runner-Transition-parent-issue-based-on-subtask-status/qaq-p/63722
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vasiliy Zverev,
succesfully Changed sub-task status by the below script:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueImpl
import com.atlassian.jira.issue.MutableIssue
import org.apache.log4j.Category
Category log = log
log.setLevel(org.apache.log4j.Level.DEBUG);
if( issue.getIssueType().getName().equals("Testing"))
{
log.info(issue.getIssueType().getName())
log.info(issue.getStatus().getStatusCategory().getName())
Issue parentIssue = issue.getParentObject()
log.info(parentIssue.getIssueType())
log.info(parentIssue.getIssueType().getName())
log.info(parentIssue.key)
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
log.info("Getting outward links...")
issueLinkManager.getOutwardLinks(parentIssue.getId()).each {
issueLink ->
MutableIssue linkIssue = issueLink.getDestinationObject() as MutableIssue
log.info(linkIssue.getIssueType())
log.info(linkIssue.getIssueType().getName())
log.info(linkIssue.key)
if ("Development".equals(linkIssue.getIssueType().getName()))
{
log.info("Setting Development task to New")
((IssueImpl) linkIssue).setStatusId("19890");
((IssueImpl) linkIssue).store();
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.