Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Doing a transition inside a workflow that belongs to another workflow.

Thilo Nietzschmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2019

Let's say I have a worflow A and a workflow B which alter data in issues of different issue types. During a transition from A I want to trigger a B transition if specific requirements are satisfied which I can only check when I am inside of A. Merging the functionality into one workflow is not an option since B is changing the status from an issue what is considered as bad practice when you do this in your code.

Currently I am calling the validateTransition function from the IssueService interface. Look here for further information:

https://docs.atlassian.com/software/jira/docs/api/7.1.9/com/atlassian/jira/bc/issue/IssueService.html#validateTransition-com.atlassian.jira.user.ApplicationUser-java.lang.Long-int-com.atlassian.jira.issue.IssueInputParameters-

All I get is an error message which says: "You've tried to execute a function transitionName what is not valid for the current state of the issue."

When I do the transition manually by clicking the button, everything works fine. What am I not seeing here?

 

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 5, 2019

I do not quite understand what you are doing here.

I do understand that you have two different workflows, but you don't explain how you are using them or what you want your code to do, because you have not told us what you are doing with the issues involved.

At a guess, I think what you might have is:

  • Issue A, of type AA, and hence associated with workflow AAA
  • Issue B, of type BB, and hence associated with workflow BBB

And what you're trying to do is "when issue A goes through a transition in workflow AAA, issue B should be pushed through a transition in BBB" - is that right?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events