Hi,
We are currently searching for the same functionality as there is currently in script runner Transition parent when all subtasks are resolved but we need to finetune it a bit. We want that one subtask has been moved to in progress that the parent issue will also go into in progress
somebody who could help us?
Hi Thomas,
For the current JIRA version, this should work:
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue Issue issue = issue def issueService = ComponentAccessor.getIssueService() def currentUser = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser() // Use the ID number of the transition you want in place of the "4" def transitionValidationResult = issueService.validateTransition(currentUser, issue.parentId, 4, issueService.newIssueInputParameters()) if (transitionValidationResult.isValid()) { issueService.transition(currentUser, transitionValidationResult) } else { log.warn("Error transitioning issue") log.warn(transitionValidationResult.errorCollection) }
If that is more logging than you want, just delete the second log.warn line.
Happy Monday
In the Script console the declaration of issue produces an undeclared error on the assignment?
"The variable [issue] is undeclared"
1) Is (out of scope) "issue" defined when run under the post function logic?
2) Is this assuming that the running transition is ONLY run for a subtask issue? ie. is in workflow dedicated to subtask issue types?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do I understand it right, that the script by "April" requires ScriptRunner to work? Can it be achieved without a plugin?
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.
So, you need:
Is it correct?
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.