How do update Story Point uisng the Issue ID

pranab_bhatta
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!
January 9, 2022

Hi Team,

I wanted to just update Story Point using the issue id, I tried the below request

URL - https://subdomain.atlassian.net/rest/api/3/issue/<Issue ID or Key>

Method: PUT

Body:

{
    "updates": {
        "fields": {
            "customfield_10002"9
        }
    }
}
Error
{
    "errorMessages": [
        "one of 'fields' or 'update' required"
    ],
    "errors": {}
}
Here I just wanted to update the Story Point for a particular story. I don't want to update other properties.
Could someone please help here?
Thanks,
Pranab

1 answer

2 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 9, 2022

Hi @pranab_bhatta 

Welcome to the Atlassian Community!!

First, get the issue ID from the GET request

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get

Next for the sprint, you need to have the custom field ID as in this case my site's custom field was customfield_10020

You need to make the PUT call to update the sprint

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put

curl -i --request PUT \
--url 'https://yoursite.atlassian.net/rest/api/3/issue/WSP-128' \
--user 'email:token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{ "fields": { "customfield_10020": 3 } }'

Thanks,
Pramodh

pranab_bhatta
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!
January 11, 2022

Hi Pramodh - Thanks for the reply.

 

I tried, but getting below error -

{
    "errorMessages": [],
    "errors": {
        "customfield_10002""Field 'customfield_10002' cannot be set. It is not on the appropriate screen, or unknown."
    }
}
I have used the Issue ID or Key to update the story point.
Thanks,
Pranab

Suggest an answer

Log in or Sign up to answer