Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation Priority Adjustment Based on a Customer Custom Field

Riley Sullivan
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 30, 2023

Summary:

In our projects, we use a custom multi-select list field for our Clients' Account IDs, primarily because the 'customers' designated in our Jira projects represent our internal teams. These teams are responsible for submitting tickets and bugs to our Product, Engineering Support, and Dev teams.

We use a multi-select list field so clients who pay for premier status are granted a higher priority with our Product and Engineering teams. As part of their premier privileges, these clients automatically receive a bump in priority level above our standard priority matrix. We really needed this process to be automated with our volumes, we set out to create an automation to adjust the priority based on this custom field.

 

First Attempt:

Our initial trials were characterized by multiple unsuccessful attempts. We tried several variations of a multi-select list and numerous 'If-Then' statements for each priority level. However, these attempts resulted in inconsistent outcomes. Whenever the multi-select contained more than one customer, it seemed to escalate the priority level multiple times, contrary to our expectations.

Screenshot 2023-06-30 at 11.27.53 AM.pngScreenshot 2023-06-30 at 11.28.04 AM.png

Successful Solution:

Eventually, we found a more straightforward and efficient solution that I hope will assist anyone with a similar setup:

  1. Trigger: Issue creation
  2. Condition: If the customer field includes any client from the premier list
  3. Action: Edit issue
{
"fields": {
"priority": { "id": "{{#=}}{{issue.priority.id}} - 1{{/}}" }
}
}

Screenshot 2023-06-30 at 1.07.59 PM.png

This simple automation will adjust the priority of the issue based on the list of clients that pay for premier. Hope this helps anyone that have a similar need to streamline internal workflows!

1 comment

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 3, 2023

Hi @Riley Sullivan ,

I think the inconsistency is because of your assumption that the priority ids {{issue.priority.id}}   match with the priorities.

If you take a look at https://<yoursite>.atlassian.net/secure/admin/ViewPriorities.jspa and hoover with your mouse over the edit link. You will see the priority ids in the link. For me it is:

  • Blocker: id = 10005
  • High: id = 1
  • Medium: id = 3
  • Low: id =4
  • Minor: id = 10006

If {{issue.priority.id}} = 1 and you substract 1, what would be the priority?

So this could be the cause of the behaviour you are seeing.

Instead of the If...then...else you might want to use the Create lookup table. E.g. bumpUpPriority table where you match the current prio, with the prio which is one higher. For the highest prio you don't have to change.

Riley Sullivan
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.
July 3, 2023

Hi @Rudy Holtkamp 

 

Interesting! Our priority ID's are setup in order, maybe the 5 digit ID's are custom priorities? Here is how they are setup in our instance:

  • Highest: 1
  • High: 2
  • Medium: 3
  • Low: 4
  • Lowest: 5

Great question, right after I made this post, we were receiving some errors in automation with the exact scenario you described. In our case, when Highest priority id = 1, subtracting 1 would error the automation. So I updated to exclude our highest priority status.

  1. Trigger: Issue creation
  2. Condition: Priority != Highest
  3. Condition: If the customer field includes any client from the premier list
  4. Action: Edit issue
{
"fields": {
"priority": { "id": "{{#=}}{{issue.priority.id}} - 1{{/}}" }
}
}

 

I am still learning lookup tables, so I will also try that approach as well! Seems in your instance lookup tables would be the right approach.

 

Appreciate the discussion, cheers!

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events