Forums

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

Transition an issue of another type within the same Epic?

Eugenio Aguilar June 7, 2016

Is there a way to have a post-function to automatically transition another issue of a different type that belongs to the same Epic?

We have JIRA Misc Workflow Extensions installed. There are post-function options there to transition linked issues or parent issues, but since two issues belonging to the same Epic aren't linked between themselves this doesn't really work.

 

Maybe my question is clearer with an example:

Always within an Epic we have several issues of different types, but usually only one of each type. So for example, we would have issue types:

Type1

Type2

Type3

and each Epic has one ticket of each type.

What I want to achieve is that when an issue of, say, Type1 goes through a specific transition that it would then automatically trigger a transition of the issue of Type2 within the same Epic.

For example, we have:

EpicA

Issue1 == Type1

Issue2 == Type2

 

Both Issue1 and Issue2 are under EpicA.

Someone is working on Issue1 and transitions it to status "Done". When that happens, Issue2 gets automatically transitioned to status "In Progress".

2 answers

0 votes
Fidel Castro
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.
June 9, 2016

Hi Eugenio, there is a simple way to do it with JIRA Workflow Toolbox plugin, sharing the same workflow among all issue types.

Now, I explain in detail the configuration to implement your example.

EXAMPLE:

EpicA

Issue1 == Type1

Issue2 == Type2

Both Issue1 and Issue2 are under EpicA.

Someone is working on Issue1 and transitions it to status "Done". When that happens, Issue2 gets automatically transitioned to status "In Progress".

 

SOLUTION:

We implement it using 2 post-functions:

1) Insert "Copy a parsed text to a field" post-function in transition to status Done with the following configuration:

Captura de pantalla 2016-06-10 a las 11.45.03.png

Text to be parsed is:

toString(filterByIssueType(linkedIssues("is Epic of", linkedIssues("has Epic")), "Type2"))

 

2) Insert "Write field on issues returned by JQL query" post-function in transition to status Done with the following configuration:

Captura de pantalla 2016-06-10 a las 11.48.38.png

Conditional execution is:

%{00014} = "Type1"

Note that %{00014} is field code for Issue Type.


Once configured, transition to status Done will look like this:

Captura de pantalla 2016-06-10 a las 11.52.35.png

Please, let me know if you have any doubt about this solution.

Regards,

Fidel

0 votes
Nicolas Bourdages
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.
June 7, 2016

That's tricky, since there's no direct link between issues 1 and 2. If there was any type of Issue Link, that would be easy with the JIRA Misc. Workflow extension. 

The only thing I can think of without code would be a 2-step process:

  1. Issue 1 is set to Done, it calls a post function through the Epic Link to transition the Epic. This would only serve to call another post-function from the Epic. The transition doesn't need to be to another status: You can transition the linked Epic from In Progress back to In Progress.
  2. Set a post-function in the Epic workflow that cause issues linked to it (issue 2) to transition from whatever status to In Progress. If you use a different workflow for type 2 issues, that's the best, because you can set up a global transition to In Progress with a specific name or ID that doesn't exist in the workflows for issues of type 1 and 3. No risk of impacting unwanted issues.

I think that would work fine. Be aware that you risk seeing stack traces related to this in your logs, since the post functions will try to transition all issues under the Epic, but will fail because it doesn't find the specific workflow transition for them. This will likely generate errors.

 

Eugenio Aguilar June 7, 2016

Thanks. This seems like it could work, but if I could have the Epic only transition children of a certain type, otherwise it might just transition all issues in the Epic. We don't have separate workflows for each issue type and don't currently plan on having that, since our workflow is quite complex and maintaining clone copies doesn't make much sense.

Nicolas Bourdages
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.
June 8, 2016

If you can't make a special workflow, you need a special type of link either between issues 1 and 2, or between the Epic and issue 2. Like, the post-function from issue one calls a transition in the Epic, and the post-function from the Epic calls a transition through a "type2 link" that links to issue 2.

Suggest an answer

Log in or Sign up to answer