It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Custom field created as Version Picker - SQL Query in database

Ankit Kothari Dec 04, 2012

Hi,

I have created a custom field (for eg. Release) of type single version picker.

I have created many issues and set this field. Now, I want to search for all JIRA issues for a particular release. Since, I am writing reports in BIRT, I need an SQL query.

I am able to fetch the values for all other custom values, but not for this field. (I have created 3 more fields of type version picker.)

Could you please provide me help on this? May be a sample SQL query or the table which will hold the link to the jiraissue and the value of the release custom field.

Any help on this would be appreciated.

Thanks,

Ankit

3 answers

1 vote
Andrew Frayling Feb 26, 2015

Hi Ankit,

I'm hoping you found the solution to what you were looking for, but as I've just had to do the same thing (in case it helps someone else) this is how the data is stored in the database:

 

select distinct(pv.id), cfv.numbervalue, pv.vname
from projectversion pv,
customfieldvalue cfv
where cfv.customfield = 15001
and pv.id = cfv.numbervalue;

where 15001 is the ID of the custom field you're interested in.

Values for individual issues are stored in the CUSTOMFIELDVALUE table and the lookup for the Version name is in the PROJECTVERSION table.

Andrew.

0 votes
Naren Dec 04, 2012
0 votes
Pablo Beltran Sep 02, 2015

If you need to access to JIRA data via SQL integrated with Birt, then you might want to have a look at this add-on: Birt Reports for JIRA.

 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase

Friday Fun: What's your best vacation planning hack?

Let's face it, work can be challenging but fulfilling, especially when you enjoy the challenges thrown at you.  However for me, nothing compares to going on vacation (or holiday as some of you m...

580 views 29 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you