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

Can I automate priority based on client and/or epic? I.e. Client = X, Priority = P2

Looking to streamline prioritization based on set criteria.  

1 answer

0 votes
Jack Community Leader Oct 21, 2019

Does "client" translate to "Reporter" if so, you would need an automation addon for this, e.g. Automation for Jira, Scriptrunner Power Scripts, etc. The one exception is for your Epic requirement. If you mean to say that you want all Epics to have a specific priority, you could use a unique Workflow and on the create transition use a Post Function to set the priority.

"Client" would be another field similar to "Label" or "Component".  I spend a lot of time looking at tickets, figuring out who the client is, and making priority determinations based on the client.  I have direct mappings in a google sheet of client to priority and feel that I can automate it somehow through JIRA

If you have the JIRA Suite Utilities plugin you can automate the priority setup by using a post function to set the issue field value (assuming the priority field is the system one and not a customfield. If it's a customfield use the "Update any issue field value" option). For this to work you will need to create a new transition to a destination status for each priority value and simply make them usable only if the "Client" field value is set to the relevant value for each priority setting using the transition conditions.

 

For example:

Transition 1

Name: "Approve" - Cond: allow if customfield value; Client = State or Fed

                Post Function: Set Issue Field Value: = Critical

                                      Result: When the item transitions from status A to B the Priority field is set to "Critical".

Transition 2

Name: "Approve " - Cond: allow if customfield value; Client = Other

                Post Function: Set Issue Field Value: = Medium

                                      Result: When the item transitions from status A to B the Priority field is set to "Medium".

Transition 3

Name: "Approve  " - Cond: allow if customfield value; Client = Non-Client

                Post Function: Set Issue Field Value: = Low

                                      Result: When the item transitions from status A to B the Priority field is set to "Low"

Since JIRA does not allow transitions with the same name to move to the same destination status I simply add an extra space to each subsequent "Approve". That way the button looks the same for all users clicking to move from status A to B.

Depending on how many priority levels you have and the conditions for assigning them are this will be easy or complicated.

 

Hope this helps.

 

David

David's solution works perfectly fine. You could even improve it in just 1 transition by using Preconditions for Post Functions.

Transition "Prioritize":

  • Precondition: Client = X?
  • Post Function: Update Priority = P2
  • Precondition: Client = Y?
  • Post Function: Update Priority = P3

All in 1 transition in the section for post functions.
You could even combine several Preconditions with AND/OR for more complex cases.

 

See also the documentation:

https://confluence-apps.beecom.ch/display/JSU/Workflow+Preconditions

https://confluence-apps.beecom.ch/display/JSU/Value+Field+Precondition

https://confluence-apps.beecom.ch/display/JSU/Update+any+Issue+Field+Post-Function

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

842 views 5 22
Read article

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