Unable to give story points when creating a subtask

Yashica Gupta October 24, 2018

Hi,

I am trying to send a post request to jira rest api to create a new subtask but I am not able to edit/ store story points.

There is no key-pair available to send data about the story points.

 

Am I doing something wrong or is there no solution to it? 

Here is my Request JSON -


   data={
   "fields":{
    "parent":{
       "id": task_id
    },
    "project":{
       "Id":projectid
    },
    "summary":message,
    "description" : msg,
    
   
    "issuetype":{
       "id":"5"
    }}}

 

response = requests.post(url="{}/rest/api/2/issue/".format(server),json=data, headers={"Content-Type": "application/json"},auth=(username,password))

 

1 answer

1 vote
Alexey Matveev
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.
October 24, 2018

Hello,

Have a look for an answer here:

https://community.developer.atlassian.com/t/how-to-update-customfield-of-an-issue-using-rest-api/3874

you need to define the id of your Story Points field and then add to the field part something like this:

"fields": { "customfield_10006" : 3 }

In the example above 10006 is the id of the Story Points field .

Yashica Gupta October 25, 2018

Hi Alexey,
I am trying to create a new subtask but sending this field throws an error. I am able to update the issue using this field but not during creating a subtask. 

Any solution for it?

Alexey Matveev
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.
October 25, 2018

It means that the Story point field is not on the subtask screen. Go to project settings -> screens. Find the create screen for the subtask issue type and add the Story Points field there.

Suggest an answer

Log in or Sign up to answer