Update Jira sub task status using angular.

Manoj Kumar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 24, 2022

Hi Team, Good Day!!.

        In Anguar I'm trying to update Jira sub task status update using transitions -  api/2/issue/JJIRAidorKEY/transitions  with POST request.  but the response gives XSRF checked failed. statusCode: 403. 

Im able to fetch Jira Data using GET request.. this is first time Im using POSt request to update  "name":"In Progress" to "Done.

{
  "update": {
    "subtasks": [
      {
        "fields": {

                        "status":{

                                       "statusCategory":{

                                                                 "name":"In Progress"

                                                                 }

                                        }

                         }

          }
  },
  "transition": {
    "id": "31"
  }

}

 

Pls suggest if we you know any other approach in angular.

Your help is appreciated!!

2 answers

Suggest an answer

Log in or Sign up to answer
1 vote
Amir Katz (Outseer)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 24, 2022

Not sure whether it's related, but I do know that for POST and PUT request you need to add this header:

{'Content-Type': 'application/json'}

This is in addition to the header needed in all Jira REST-API requests:

{'Accept': 'application/json'}
0 votes
Christof Hurst
Contributor
August 30, 2022

You can't just update the name. You must execute the transition. Even not the status category. You need to mention the new status I think. But I don't have the documentation in mind.

TAGS
AUG Leaders

Atlassian Community Events