Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I created simple automation to set the priority but it keeps getting an error

Marc Tseu February 18, 2025

I created a simple automation that will change the priority field upon ticket creation based on the value of a custom field.  However, I get this error when it gets to the point of the automation to set the priority:

 

The priority selected is invalid. (priority))

 

I'm not sure why it is invalid as the value is what Jira prompts me for.  Any advice on how to troubleshoot is greatly appreciated.

3 answers

0 votes
Marc Tseu February 19, 2025

I figured it out.  I didn't realize that we had custom priority settings and I just needed to scroll down the list further to see them and set those for this project.  It works now.

 

FYI,

 

Marc

0 votes
Bill Sheboy
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.
February 18, 2025

Hi @Marc Tseu 

Weird errors / unexpected behaviors can happen with the Issue Created trigger because it can fire so quickly the issue may not have all of its data when the rule starts.  (i.e., a racetrack error)

The fix for that symptom is to always add the Re-fetch Issue action immediately after the Issue Created trigger.  This will slow the rule down a bit and reload the data before it proceeds.  Please try adding that and re-testing.

  • trigger: issue created
  • action: re-fetch issue
  • ...the rest of your rule steps...

 

Kind regards,
Bill

Marc Tseu February 18, 2025

Thanks for the suggestion but it still did not work.

0 votes
John Funk
Community Champion
February 18, 2025

Hi Marc - Welcome to the Atlassian Community!

Can you share the rule? Especially any details where you are setting the Priority field.

Marc Tseu February 18, 2025

Sorry if this is not what you mean as I am new to Jira.  I exported the rule as a json file and here is the text from that file.  If there is another way, please let me know:

{"cloud":true,"rules":[{"id":25359170,"clientKey":"0c02e0f8-2cd3-3c32-b02b-c5339646a27e","name":"Set Priority","state":"ENABLED","description":"Takes the user selection of priority and changes the Jira priority level (internal)","authorAccountId":"712020:0e294ff0-9ccd-446a-8f0d-e77bca632eb7","actor":{"type":"ACCOUNT_ID","value":"557058:f58131cb-b67d-43c7-b30d-6b58d40bd077"},"created":1739913338282,"updated":1739913338282,"trigger":{"id":"693445362","component":"TRIGGER","parentId":null,"conditionParentId":null,"schemaVersion":1,"type":"jira.issue.event.trigger:created","value":{"eventFilters":["ari:cloud:jira:faf6eb67-8f7a-44bd-bf4b-a55697e2751a:project/10002"],"eventKey":"jira:issue_created","issueEvent":"issue_created"},"children":[],"conditions":[],"connectionId":null},"components":[{"id":"693445363","component":"CONDITION","parentId":null,"conditionParentId":null,"schemaVersion":1,"type":"jira.condition.container.block","value":null,"children":[{"id":"693445364","component":"CONDITION_BLOCK","parentId":"693445363","conditionParentId":null,"schemaVersion":1,"type":"jira.condition.if.block","value":{"conditionMatchType":"ALL"},"children":[{"id":"693445366","component":"ACTION","parentId":"693445364","conditionParentId":null,"schemaVersion":12,"type":"jira.issue.edit","value":{"operations":[{"field":{"type":"ID","value":"priority"},"fieldType":"priority","type":"SET","value":{"type":"ID","value":"1"}}],"advancedFields":null,"sendNotifications":true},"children":[],"conditions":[],"connectionId":null}],"conditions":[{"id":"693445365","component":"CONDITION","parentId":null,"conditionParentId":"693445364","schemaVersion":3,"type":"jira.issue.condition","value":{"selectedField":{"type":"NAME","value":"Tech Support Priority"},"selectedFieldType":"com.atlassian.jira.plugin.system.customfieldtypes:select","comparison":"EQUALS","compareValue":{"type":"NAME","modifier":null,"value":"Large Scale Business Disruption","multiValue":false,"source":null}},"children":[],"conditions":[],"connectionId":null}],"connectionId":null},{"id":"693445367","component":"CONDITION_BLOCK","parentId":"693445363","conditionParentId":null,"schemaVersion":1,"type":"jira.condition.if.block","value":{"conditionMatchType":"ALL"},"children":[{"id":"693445369","component":"ACTION","parentId":"693445367","conditionParentId":null,"schemaVersion":12,"type":"jira.issue.edit","value":{"operations":[{"field":{"type":"ID","value":"priority"},"fieldType":"priority","type":"SET","value":{"type":"ID","value":"2"}}],"advancedFields":null,"sendNotifications":true},"children":[],"conditions":[],"connectionId":null}],"conditions":[{"id":"693445368","component":"CONDITION","parentId":null,"conditionParentId":"693445367","schemaVersion":3,"type":"jira.issue.condition","value":{"selectedField":{"type":"NAME","value":"Tech Support Priority"},"selectedFieldType":"com.atlassian.jira.plugin.system.customfieldtypes:select","comparison":"EQUALS","compareValue":{"type":"NAME","modifier":null,"value":"Business interruption but workarounds","multiValue":false,"source":null}},"children":[],"conditions":[],"connectionId":null}],"connectionId":null},{"id":"693445370","component":"CONDITION_BLOCK","parentId":"693445363","conditionParentId":null,"schemaVersion":1,"type":"jira.condition.if.block","value":{"conditionMatchType":"ALL"},"children":[{"id":"693445372","component":"ACTION","parentId":"693445370","conditionParentId":null,"schemaVersion":12,"type":"jira.issue.edit","value":{"operations":[{"field":{"type":"ID","value":"priority"},"fieldType":"priority","type":"SET","value":{"type":"ID","value":"3"}}],"advancedFields":null,"sendNotifications":true},"children":[],"conditions":[],"connectionId":null}],"conditions":[{"id":"693445371","component":"CONDITION","parentId":null,"conditionParentId":"693445370","schemaVersion":3,"type":"jira.issue.condition","value":{"selectedField":{"type":"NAME","value":"Tech Support Priority"},"selectedFieldType":"com.atlassian.jira.plugin.system.customfieldtypes:select","comparison":"EQUALS","compareValue":{"type":"NAME","modifier":null,"value":"Moderate impact, non-urgent","multiValue":false,"source":null}},"children":[],"conditions":[],"connectionId":null}],"connectionId":null},{"id":"693445373","component":"CONDITION_BLOCK","parentId":"693445363","conditionParentId":null,"schemaVersion":1,"type":"jira.condition.if.block","value":{"conditionMatchType":"ALL"},"children":[{"id":"693445375","component":"ACTION","parentId":"693445373","conditionParentId":null,"schemaVersion":12,"type":"jira.issue.edit","value":{"operations":[{"field":{"type":"ID","value":"priority"},"fieldType":"priority","type":"SET","value":{"type":"ID","value":"4"}}],"advancedFields":null,"sendNotifications":true},"children":[],"conditions":[],"connectionId":null}],"conditions":[{"id":"693445374","component":"CONDITION","parentId":null,"conditionParentId":"693445373","schemaVersion":3,"type":"jira.issue.condition","value":{"selectedField":{"type":"NAME","value":"Tech Support Priority"},"selectedFieldType":"com.atlassian.jira.plugin.system.customfieldtypes:select","comparison":"EQUALS","compareValue":{"type":"NAME","modifier":null,"value":"Minimal impact low-urgency issue","multiValue":false,"source":null}},"children":[],"conditions":[],"connectionId":null}],"connectionId":null}],"conditions":[],"connectionId":null}],"canOtherRuleTrigger":false,"notifyOnError":"FIRSTERROR","projects":[],"labels":[],"tags":[],"ruleScope":{"resources":["ari:cloud:jira:faf6eb67-8f7a-44bd-bf4b-a55697e2751a:project/10002"]},"ruleHome":{"ruleLifecycleHome":{"locationARI":"ari:cloud:jira:faf6eb67-8f7a-44bd-bf4b-a55697e2751a:project/10002"},"ruleBillingHome":{"locationARI":"ari:cloud:jira-servicedesk::site/faf6eb67-8f7a-44bd-bf4b-a55697e2751a"}},"writeAccessType":"UNRESTRICTED","collaborators":[],"billingType":"NORMAL","idUuid":"01951aea-9daa-7bbf-b424-9f70f35d5f63"}]}

John Funk
Community Champion
February 18, 2025

No, just do a screenshot of the rule.  :-)

Marc Tseu February 18, 2025

Screenshot 2025-02-18 at 5.04.32 PM.pngScreenshot 2025-02-18 at 5.04.02 PM.png

Marc Tseu February 18, 2025

Here is a screen shot of the beginning of the rule as well as the error.  It really doesn't matter which option I choose, I get the error.  

Marc Tseu February 18, 2025

Screenshot 2025-02-18 at 5.07.41 PM.pngOne more screen shot to show the THEN statement 

John Funk
Community Champion
February 18, 2025

Need to see the Else If block and details of the action to Edit the Priority field. 

Marc Tseu February 18, 2025
  1. Is the screenshot above that shows the config for the elseif block work?
Marc Tseu February 19, 2025

Maybe this screenshot will help as it is more focused on the edit screen.  I appreciate everyone's adivce!

 

Screenshot 2025-02-19 at 7.18.37 AM.png

John Funk
Community Champion
February 19, 2025

You should have two blocks - one is the IF - which you included in the first screenshot. 

The second is the ElseIf, which you have not included a screenshot for. 

Another thing to try is to go to TECHS-108136 and see if you can change the value of the Priority field directly to Low. 

 

John Funk
Community Champion
February 19, 2025

Yes, this is where I was going by trying to get that second screenshot - more than likely that would have exposed that. 

Glad you got it figured out. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events