Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Update Jira sub task status using angular.

Manoj Kumar 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 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