which table in Jira database has column of story point

Orlando W January 14, 2021

Hi, I may seek assistance on the story point column in Jira database, I could not found it in customfield, is there any other table may contain story point by any chance

 

3 answers

1 vote
Sandesh Shetty
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.
January 14, 2021

@Orlando W 

It should be in customfieldvalue table. Please check once.

Orlando W January 17, 2021

Thanks Sandesh, but do you know why it's null value in cfvalue table? even though it shows points number in sprint board 

0 votes
Filipi Lima
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 3, 2022

Hi, folks, I was helping a custom and saw this thread so might as well leave the info here for all:

To get all Story Points value from all issues on your instance, you can use the following:

SELECT ji.id as issue_id, p.pkey||'-'||ji.issuenum as key, cf.id as customfield_id, cfname, cfv.numbervalue
FROM customfield cf, customfieldvalue cfv join jiraissue ji on cfv.issue=ji.id join project p on ji.project = p.id
where cf.id = cfv.customfield
and cfname = 'Story Points';

If you'd like to reduce one join and make it a bit faster, you may fetch the ID of the Story Points field beforehand and hardcode it to your query:

select id from customfield where cfname = 'Story Points';

Then you replace the XXXXX with the ID from above:

SELECT ji.id as issue_id, p.pkey||'-'||ji.issuenum as key, cfv.numbervalue
FROM customfieldvalue cfv join jiraissue ji on cfv.issue=ji.id join project p on ji.project = p.id
where cfv.customfield = 'XXXXX';

 

If you have multiple Story Points then you need to determine which one you want.

The above is for the default Story Points which has the values on customfieldvalue.number column.

0 votes
Monika Rani
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.
January 15, 2021

Hi @Orlando W Welcome to the Atlassian Community.

You will find the story point column in "customfieldvalue" table.

I hope it will help you.

Thanks

Orlando W January 17, 2021

Thanks Monika, but I have question about that I found value or number column shows null, but I can indeed see the points in the sprint, do you know the reason, is it possible in other tables any column?

Suggest an answer

Log in or Sign up to answer