It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get to the next level in workflow design

Have you ever needed a button in an issue just to do stuff without modifying the issue status? And what about applying edit permissions on the field level? This article shows how to set workflows for covering both needs in a cost-effective way.

Natively, Jira workflows count with a really powerful feature which is just a little bit hidden. Let's name it global looping transition, which is the key functionality for achieving our goals, and has definitely changed the way I design workflows since I discovered it.

What is a global looping transition?

A global looping transition is a special kind of workflow transition that meets these two characteristics at once:

  • It is global, meaning that it can be used from any status in the workflow.
  • It loops, meaning that the status of origin is also the status of destination. In other words, the status of an issue does not change on using this kind of transition.

How does it look like?

This is the graphical representation of a global looping transition named Do something:

global-reflexive-transition.PNG

Nice! Isn't it?

How can I set that kind of transition?

A global looping transition can only be set through the diagram mode of the workflow editor, by following these steps:

  1. Click on the Add transition button:

    add-transition-button.PNG

  2. Select the following values in the dialog form:

    add-transition-dialog.PNG

  3. Give the transition a descriptive name and, finally, click on the Add button.


That's it! The transition will be created.

Some notes about global looping transitions...

  • You'll need to refresh the workflow editor page in your web browser before being able to add conditions, validators, post-functions or transition properties.
  • A workflow may contain multiple global looping transitions, all of which will be displayed in the same area.

    group.PNG

  • Adding opsbar-sequence property to all workflow transitions is a good way for displaying transitions in the desired order. While that's true for any kind of transitions, it's especially relevant for global looping ones, as it's generally preferable to display first those transitions that lead to a status change for advancing the issue through its workflow.

Use case: Triggering a post-function

Sometimes you just need to add a button to the issue detail view in order to perform actions somehow related to said issue which do not require to apply a status change.

The inefficient multiple looping (not global) transitions approach

While that purpose may be covered by creating a transition from a status to itself and adding an appropriate post-function, a similar transition should be created in each status from which the functionality should be available.

multiple-reflexive-transitions.PNG

This approach is not easy to maintain, as it requires setting multiple times the very same thing, both in its initial configuration and in future changes.

The inconsistent global (not looping) transition approach

An alternative yet bad approach consists of adding a post-function to a global transition targeting a status specifically created for this purpose. In example, if the post-function executes a calculation and modifies a field accordingly, a status named Calculating with a global transition could be created.

global.PNG

However, this is just a poor workaround, because:

  • Calculating is not a phase (status) in the issue's lifecycle (workflow), but a mere action that requires less than a second to complete. Furthermore, it can affect your reporting measures of time in status or even SLA compliance, unless additional configurations were set to prevent such things from happening.
  • Workflows with strict requirements which rely on issues following certain specific paths may force to set additional means for returning the issue to the previous status in order to preserve consistency. Applying those extra settings would unnecessarily increase complexity with no value in return. What is more, I've even witnessed a case where a post-function was set to transition automatically to the previous status and, on stumbling upon an error caused by a different post-function, an infinite transition loop was caused. Definitely not worth it!

The correct global looping transition approach

As you've probably already noticed, using a global looping transition with the appropriate post-function is the correct way to go here, as it doesn't have any of the disadvantages caused by its counterparties.

global-reflexive-transition-approach.PNG

This is a simple and clean solution that complies with both the DRY and KISS principles (dry kiss?), strongly recommended in Jira configurations.

Use case: Edit permission on the field level

The ability to control who can edit a specific field in Jira is usually implemented this way:

  1. Remove the field from the edit issue screen.
  2. Add the field to a new screen.
  3. Add the new screen to a wokflow transition.
  4. Add a condition to the transition to enable it just for the appropriate users.

However, doing so without the help of a global looping transition counts with the same disadvantages previously shown in the section Use case: Triggering a post-function.

Thanks to the native global looping transition feature, controlling edit permission on the field level is both an easier and a more feasible task.

12 comments

Daniel Eads Atlassian Team Aug 08, 2019

Great article! Other literature (namely Matt Doar's Practical Jira Administration) refers a transition that goes back to the same status as a looping transition, but the use of "to itself" as a target (the global part in your example) is new here as far as I've seen. That definitely does clean things up and make it more maintainable!

Other variations on the name I've seen in the past are "transition loop", "circular transition", "null transition", "self transition" - stuffing those here to improve searchability :)

Antonio Ferruz Community Leader Aug 08, 2019

"Learn something every day! " , I repeat that to myself everyday... and today .. you made my day!

I have been applying on multiple workflows some of the approaches , like the one mentioned by @Daniel Eads ,  that you have described in your article .. BUT you have opened  my mind to new option. 
Never thought about, great article . 

I work on workflows most of my days .. I am sure I will use your article as a reference soon. 

Antonio

Great job!! Thanks for sharing with the community!!

Thank you all!

@Daniel Eads I like the term looping transition. My vote for Atlassian officially naming it that way! 😃

@Antonio Ferruz Glad you liked it! 😉

@Fabian A. Lopez -ACL -Mentor- I enjoyed reading your articles too! 😊

Great article!!

It will be very useful.

Thank you @Ignacio Pulgar !!

Rachel Wright Community Leader Aug 12, 2019

Excellent work @Ignacio Pulgar !  I also use the term "looping transition" but I'm not sure where I got that from  Maybe from Matt Doar?

I'll be passing through Madrid next month and will wave to you from a distance.  Keep up the good work!

Ignacio Pulgar Community Leader Aug 13, 2019

Thank you @Rachel Wright ! It's an honor reading those words from such a reknown author!

I'll feel the Force next month! :)

I think I got the term "looping transition" from Rachel. It's clearer than "(global) self-transition" which I was using before that.

Ignacio Pulgar Community Leader Aug 13, 2019

By popular demand, I've edited the article by substituting the term reflexive with the clearer and most extended term looping.

Ignacio Pulgar Community Leader Aug 14, 2019

If you think global looping transitions rock, please, vote for this suggestion so that all Jira admins can easily discover this feature while designing workflows.

Comment

Log in or Sign up to comment
Community showcase
Posted in Portfolio for Jira

Program managers, we need your help! We want to learn about how you plan work for a team of teams

Hi community members, My name is Erika and I’m a product manager at Atlassian. We’re currently investigating how teams are planning work at the program level. We understand that every team in a tea...

146 views 0 5
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you