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:
--request POST \
--url 'https://<URL>.atlassian.net/rest/api/3/issue' \
--user 'firstname.lastname@example.org:APITOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
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?
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.
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.
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