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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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

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

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