Hello,
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>.atlassian.net/rest/api/3/issue' \
--user 'user@somemail.com:APITOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data @jiraData
jiraData:
{
"fields":{
"project":{
"key":"TES"
},
"summary":"TEST",
"description":{
"type":"doc",
"version":1,
"content":[
{
"type":"paragraph",
"content":[
{
"type":"text",
"text":"description"
}
]
}
]
},
"issuetype":{
"name":"Task"
}
}
}
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?