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

Generating priority based on keywords in descripton Edited


I'm working on issue generation by using Jira API and curl on Jira Cloud.

I have no problems generating new issues this way and everything goes smooth:

curl \
--request POST \
--url 'https://<URL>' \
--user '' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data @jiraData




My question - is there a way to automatically assign the priority of the generated issue based on a keyword in the description?

Example - If the description contains words "old" or "outdated" automatically set the priority of the issue to High, but if it doesn't set the priority of the issue to Minor.

Can this be accomplished using only Jira, or do I need to make a script to scan the jiraData file and if it detects any of the keywords make the script modify the jiraData by adding the priority field and then running curl?

2 answers

1 accepted

1 vote
Answer accepted

Only Jira, meaning not using plugins? 

Easiest way by a mile is to use one of the plugins that build more automation functionality like Automation for Jira. 

If you don't want to use plugins and are generating these issues then I would suggest that you build that functionality into the creation process. 

Thank you for the information. I was not aware there are plugins for this.

Problem solved.

Try set this dependencies not around api but in workflow post function on create. I think this is the best place to set this.

I am not sure basic post functions will allow it to You, but if You have ScriptRunner that shouldnt be any problem.

Workflow post functions could set the priority but you would not have the "IF / THEN" statement that is needed to control the behavior. 

I guess a possibility would be to have multiple transitions and then use conditions to limit which transition is chosen, leaving only one option, then add a way to autotransiton the issue.....

I would not recommend anyone doing it this way though as I can see way to many issues with user interaction and admin for this.   

Like Ivan Kordic likes this

Suggest an answer

Log in or Sign up to answer

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