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

Need for a dedicated key for Story points in JIRA Rest api

Hi,
I am trying to build an Alexa skill integrated with Jira. 

I need to collect the story point of each issue but the response from rest API does not have any dedicated key in JSON to get the “story points”.

It might vary based on jira the server URL.

Example- in our case, “customfield_10004” is defined for story points. 

 

Is there any solution to this? Do you think there could be any other way to get the story points of each issue and subtask? 

 

 

 

 

2 answers

6 votes
Rhys Diab _Agile Docs_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Aug 08, 2019 • edited Aug 08, 2020

Hi Yashica.

The way you can consistently get the story points of an issue is to first determine what custom field story points are on for that instance.

To do this, search through the fields using this endpoint: /rest/api/3/field

This will return an array of objects.

Filter the array, looking for the object with the name 'Story points estimate' if it's a next-gen project or 'Story Points' if it's a classic project. 

It will look something like this:

{  
   "id":"customfield_10016",
   "key":"customfield_10016",
   "name":"Story point estimate",
   "custom":true,
   "orderable":true,
   "navigable":true,
   "searchable":true,
   "clauseNames":[  
      "cf[10016]",
      "Story point estimate"
   ],
   "schema":{  
      "type":"number",
      "custom":"com.atlassian.jira.plugin.system.customfieldtypes:float",
      "customId":10016
   }
},

Save the id of this object (in this case customfield_10016). Then look for that custom field every time you request an issue.

This will get you the story point estimate of your issue every time.

Hope that helps!

Great answer!

Thank you!

D Smith
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!
Nov 21, 2023

Sometimes I wonder if the people designing these Atlassian rest APIs ever actually spoke to developers or considered how they would be consumed... always feels like so much effort for the simplest thing.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 23, 2023

@D Smith - Atlassian very much do talk to developers, they even pay for flights and hotels in order to get external people to work with them. 

I'm not in the right role to get a trip to Sydney from them, but I know a lot of Adaptavists who have worked with Atlassian on how they should be extending the REST APIs (and other stuff).  As an example, three of us spent a couple of weeks there working on how to enable Scriptrunner Behaviours on cloud.

So, yes, stop wondering, Atlassian are listening, and working with partners as well.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 25, 2018

The only solution is to code defensively - not only do you have to assume the cusomfield_id for Story Points varies by system, it might not be the estimation statistic in that system or project.

The best you can do defensively is to use https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F&utm_medium=302#api-api-3-issue-issueIdOrKey-editmeta-get to get the fields available for edit in a project, and parse through it looking for something that might be named similarly to "story points".

But, I'd be asking the user to do some setup and tell your application what the field is in their Jira.

How you get the story points from jira?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 27, 2019

Um, look at the issue?

Like aignatyev likes this

Suggest an answer

Log in or Sign up to answer