Jira Cloud and Logical Workflow Functions

By Kevin Lynch

Senior Atlassian Engineer

I love Jira Cloud. With Jira Cloud you don’t have to host your own server instance of Jira, and fast support is available when questions or issues arise. Plus, Jira Cloud has many common workflow features, including assigning the issue to certain people, updating fields and more. But every now and then you run into a situation where Jira Cloud doesn’t do what you want it to do “out of the box.” Then what? This is where third-party apps come in.

I recently ran into one of these situations. I needed the ability to modify a workflow based on criteria I was presented with. Specifically, we needed the system to read the submitted values for two custom fields and then change a system field based on a true/false logic. Although Jira Cloud does not have logical statement capability, a terrific app from Innovalog, Jira Misc Workflow Extensions, does.

This app, which is now available for Cloud, allows you to modify workflows to include logic statements, custom transitions, copying of values from one field to another, and more. It’s a great way to supercharge your Cloud experience and be able to perform these logic-based workflow functions with just a few clicks!

Here’s how to add the ability to test values against two fields and then set the Priority:

  1. Install the Jira Misc Workflow Extension

    a. Go to your Jira Cloud instance – Settings – Add-ons, and search for “Jira Misc Workflow Extensions.”

    Jira Cloud

    Click on the Free trial and the app will automatically be installed to your instance.

     

  2. Decide what workflow process will be modified

    a. Go back to your Jira Service Desk projects – Settings – Workflows, and click the Pencil icon to the right of the workflow you want to modify. I chose to work on the Incident Management workflow.

    Jira Cloud
    In this example, for our workflow process we will have the user select a value from the impact field choices and then from the urgency field choices. Depending on the values chosen, the workflow will set the Priority appropriate for the Incident. We want this action to take place at the point when the Incident is created. This means we need to set the value during the creation of the Transition. To do this, we click on the step that has the lowest “(id)”. Our lowest step is the Open(1) step (your step may be different depending on if changes have been made).

      Jira Cloud

    b. Then to the left of the Open (1) step we see the Create transition. Click on Create. Again, your workflow may be different and you may have to hunt down the Create transition. Once in the transition, select the Post Function tab.

    Jira Cloud

     

  3. Determine field values for the desired logical Post Function

    a. Before you Add your new Post Function, you must identify the actual values in your field(s) that will be used. Here are the defaults for the Impact, Urgency and Priority fields:
    Impact:  Urgency: 

    Priorities: Highest, High, Medium, Low, Lowest

  4. Customize the JMWE Post Function

    a. Now go back to the workflow and Add a Post Function. You will see many selections available; choose the “Set field value (JMWE add-on)” and click Add. This may look overwhelming, but the documentation supplied by Innovalog is very well done.

    b. First, select the Field you will be updating. From the drop down, choose Priority, then for the Value field, put the Priority value you wish. For our discussion here, I chose ‘Highest’. The value of this must be exact case and characters.
    Jira Cloud

    c. We don’t need to Send notifications for this change, so we unchecked it.
    Jira Cloud

    d. Put a check mark in the ‘Run this post-function only if a condition is verified’ box. This is where the magic happens. A new Condition field will appear and many selections will be available to identify the fields, create custom conditions and validate your condition. You can experiment by clicking on the dropdowns below the Condition entry.
    Jira Cloud

    e. If you have entered anything in the Condition entry field, delete it.

    f. In order to identify the correct Condition, click on the Issue Fields dropdown and choose the Impact field from ‘Select a field’.  I chose the TESTING THE FIELD’S VALUE first selection Jira Cloud

    g.  After you do this, you should then see this corresponding Condition in the Condition entry. Now you need to add a second field to test against. First click in the Condition entry area. Go to the end of the statement and put ‘ and ‘ (without the single quotes). I selected the field Urgency from the ‘Select a field’ dropdown and selected the testing value as I did before. There is one last thing to do to this Condition entry in order for it to process it as a conditional test correctly. You must put two open curly braces at the start and two close curly braces at the end of your Condition entry. Otherwise it will not process correctly and your transition will not function as it should.
    Jira Cloud

    h. The final step is to indicate who the field change will be logged as. For this example, I chose the ‘Run as this user’ and chose myself. But you can choose a different user.
    Jira Cloud

    i. Now click Update. Your new post function will appear in the list.
    Jira Cloud
    j. Publish your Draft and test it by creating a new issue using the Issue type you chose. For our process, the Medium priority was already the default. Therefore we only needed to test for conditions that would set the value of the priority to something else.

By utilizing the added features of Jira Misc Workflow Extensions in the Jira Cloud environment, you expand the functionality of Jira Cloud and allow for more complex workflow functions. It’s because of this add-on that you can now set the value of fields based on the values found in one or more fields and provide a more dynamic workflow experience.

Need help with this or any other Jira or Atlassian issue? Please feel free to view all of our Atlassian services, fill out our contact form or give us a call. As Atlassian Platinum Solution Partners, we have the expertise you need for any Jira Service Desk project.
  • This field is for validation purposes and should be left unchanged.