global-loop-advanced-workflow-jira-illustration
Author: Bogdan Gorka
Published: February 21, 2021
CategoryWorkflows

If you have been using and administering Jira for some time, chances are that you have not heard yet about a global loop workflow transition. This is a unique type of transition which is available for an issue all the time as a button and is not linked with any status. Just recently this functionality has been released in Jira Cloud and it is a good occasion to compare it in Jira Server and Jira Cloud.

How to create a global loop transition?

Let’s start with a simple workflow

global-loop-advanced-workflow-jira-01

For the purpose of this article, let’s use the following use case scenario:

I need a global loop transition so I will be able to initiate an automation on every status.

If I wanted this to be possible for only one status then I would use a local looping transition on only one status. In many use case scenarios this is enough. 

global-loop-advanced-workflow-jira-02

In my scenario, I want this special ‘Take over’ transition to be possible on every transition. I am not going to create four local looping transitions because I have four statuses. That is why I need a global loop transition and here is how you can do it too.

global-loop-advanced-workflow-jira-03

Add a new global transition following the steps:

  1. click Add transition (1)
  2. then select options From status: Any status (2)
  3. select option To status: Itself (3).
  4. finally give the transition a name. When you click Add, you will see the additional and separate transition available.
global-loop-advanced-workflow-jira-04

Global loop transition in Jira Cloud

In Jira Cloud adding a global loop transition has only been possible since 11 February 2021. Configuring it looks exactly the same as in the Server version. The difference is in how this transition looks like on the issue screen. Let’s compare.

This is how the global loop looks like in Jira Server

global-loop-advanced-workflow-jira-05

As you can see, in Jira Server this is simply another transition button which will be available on each screen. If you want to configure the order in which other transition buttons will appear, make sure to read my article about setting workflow properties

And this is how the global loop looks like in Jira Cloud.

global-loop-advanced-workflow-jira-06

I like the way it was implemented. In Jira Cloud, the global loop is a separate button located next to the ‘regular’ transitions. 

Adding a special Jira Event

The simplest use case on how to use the global loop is to secure the editing of fields for some users.

All you have to do is to place a secured field on a special transition screen which you hide from not authorized users with a workflow condition. I have described a similar way on how to do it in in my other article.

In this article I wanted to show you a more advanced scenario - with Automation for Jira initiated by a special Jira event. The procedure described below will work only for Jira Server, because you cannot (yet?) assign Jira events to Automation for Jira Cloud.

Let’s start from adding a new event in Jira. Go to Jira Administration / System / Event and add a new event. See the example below.

global-loop-advanced-workflow-jira-07

Later on go to your workflow with a global loop transition and replace a generic event with a newly created event in your post-functions.

global-loop-advanced-workflow-jira-08

Now your workflow with a global loop is ready for linking it with an Automation procedure.

Using the Global Loop transition with Automation for Jira

In my use case I want to do three changes in one go when I press the Take Over button:

  1. Assign the issue to current user
  2. Add a comment that the issue has been taken over by a current user
  3. Send a notification about this change to a Reporter, if the Reporter is different from a current user.

If you use the app Jira for Automation, this is how the Automation could look like.

global-loop-advanced-workflow-jira-09

In the first part of this automation procedure, I declare that the procedure should be initiated only when a special event is triggered - Automation Start added to the workflow post-function.

Then I edit the issue by changing the Assignee to current user and make a note about it in the Comments area: This issue has been taken over by {{initiator.DisplayName}}

In the second part I check if the Reporter is not current user. If not, I want to send a current Reporter an e-mail notification that the issue has been taken over by a different user.

global-loop-advanced-workflow-jira-10

Before you go

Global loop transition is a very useful functionality and I am glad that Atlassian has made it possible recently.

However, as I have discovered working on this article, there is no way to associate it with Automation for Jira Cloud, because events created by a user in Jira Cloud are unfortunately not visible in Automation for Jira Cloud. 

global-loop-advanced-workflow-jira-11

For now you can only use a workaround with a manually triggered Automation, which is less than an ideal solution.


Spread the knowledge, share with others

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
Teach Yourself Jira Ebook Cover

Get free e-book

Teach Yourself Jira Administration

Join our ever growing group of Jira Administration enthusiasts and get this e-book for free.

Teach Yourself Jira Administration is my selection of best Jira Administration courses for Jira - over 30 hours of recordings.

In this e-book I selected only the few recommended courses with good and effective content for which you do not have to pay (if you follow my instructions).