I am trying to create a plugin that would move the transition of the linked ticket that was related to this current issue. For example, there is a TEST-123 is linked to HOT-222 (sorta like parent of TEST-123). When TEST-123 is in "Development" status of the workflow, I would like HOT-222 to be updated to "Development" as well.
I am looking for examples to how to move the transition as I know how to set the status manually.
Thank you in advance!
Community moderators have prevented the ability to post new answers.
Interestingly, the same was answered earlier today here.
Thanks :) I also found examples from Script Runner Plugin site. I wish the Answer site can search better b/c that's somethign I was worry about -- that it's been asked and I just couldnt find it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jobin,
I am following your book for WorkflowTransition .It was great .
But I am using Jython to implement this .When I say
tranitionValidRes.isValid() -it resturns me a false.
Why so ? any reason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And see https://studio.plugins.atlassian.com/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Fasttracktransitionanissue from the script runner plugin, which can transition an issue based on some condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See getErrorCollection() on the same object for why not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is the code ,
Please point if I am missing something
workflowObj = ComponentManager.getInstance().getWorkflowManager().getWorkflow(issue)
status = issue.getStatusObject().getGenericValue()
currentStep = workflowObj.getLinkedStep(status)
issueServiceObj = ComponentManager.getInstance().getIssueService()
issueParamImpl = IssueInputParametersImpl()
issueParamImpl.setAssigneeId(currUserName)
issueId = issue.getId()
System.out.println("Issue Id RFS:"+str(issueId))
actId =0L
actions =[]
actions = currentStep.getActions()
for action in actions:
System.out.println("Action:"+action.getName())
actionName = action.getName().strip()
if(actionName == 'Done by BS-ITALY'):
actId = action.getId()
transValiRes = issueServiceObj.validateTransition(currUser,issueId,91,issueParamImpl)
System.out.println("Transition Id valid")
System.out.println("transition Valid boolean :"+str(transValiRes.isValid()))
if(transValiRes.isValid()):
System.out.println("Transition validated")
transitionResult = issueServiceObj.transition(currUser,transValiRes)
System.out.println("Moving to Done by Italy")
else:
System.out.println("Moving to Done by Italy in else")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See getErrorCollection() on the same object for why not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@srividhya-r Good to know about the book :) Regarding the error, please follow Jamie's advice. There must be some error preventing you to do the transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I found that the transition is not happening due to the reason explained in this page https://answers.atlassian.com/questions/24245/why-is-jira-saying-that-a-perfectly-valid-transition-for-my-issue-is-invalid
So what can be done to make the workflow to be in "Activated" state ?
Thanks,
Srividhya
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.