I have one requirement to close all the unclosed tickets under one project. After checking JIRA API document, I found that I can use below API to implement this request.
/rest/api/2/issue/${JIRA_KEY}/transitions/?expand=transitions.fields
This solution works fine for most of the cases. But when it came to sub-task ticket, it didn't work fine.
Suppose I have a `Resolved` sub-task ticket and call above API, I will get `Reopen Issue` transition back. Below is a sample response. It doesn't return `Close Issue` transition back like other Issue Type `Bug` or `Support Request` does.
{
"expand": "transitions",
"transitions": [
{
"id": "3",
"name": "Reopen Issue",
},
"fields": {
}
]
}
If then, how can I close the sub-task JIRA ticket? Can someone give me some suggestion? Thanks a lot!
Hi @李冲
You may check if you have any mandatory field in the transition. In that case you have to send that fields
Best regards,
Pedro Felgueiras
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.