Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,362,297
Community Members
 
Community Events
168
Community Groups

Update Jira sub task status using angular.

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

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'}

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.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events