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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.