Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL query for extracting all issue types from DB

Nirmalya Mohapatra December 8, 2020

Hi,

Can someone help me to get a SQA query for extracting all issue types from JIRA DB pls. I want to know how many total issue types are there in server.

 

Regards,

Nirmalya

5 answers

0 votes
Babs Adewole January 24, 2022

SELECT i.id issuetype_Id, i.pname issue_name, COUNT(*) num_of_issues
FROM jiraissue j
JOIN issuetype i on j.issuetype = i.ID
GROUP BY i.id
ORDER BY num_of_issues DESC;

 

This will get all issue types and the number of issues in them

0 votes
Nirmalya Mohapatra July 21, 2021

Thanks all for your valuable suggestions..

0 votes
Chander Inguva
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.
December 23, 2020

Hi @Nirmalya Mohapatra 

 

For informational purposes,

 

select pname from issuetype 

would give all issue type names

 

select count(*) from issuetype would give you count

 

Hope this helps

Thanks

Chander Inguva

0 votes
Nic Brough -Adaptavist-
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.
December 8, 2020

Best solution is to go to Admin -> Issues -> Issue types and read the page.

With SQL, you're going to have to faff around joining tables and you shouldn't really have any access to the database at all if you're looking after it properly.

0 votes
Guilhem Dupuy
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.
December 8, 2020

Hello,

As a mater of fact, you can't extract all issue types from a JQL query.

However, you can extract all issues from your Jira instance, and then using Excel to analyse the obtained file

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira service management, jsm webinar, ai in jsm, opsgenie integration, incident management, virtual agent, atlassian intelligence, ai-powered service desk, it operations, atlassian learning, service management webinar, team '25 recap

What’s new in Jira Service Management 🤔

Discover how Atlassian is revolutionizing service management with cutting-edge solutions for AI-powered support, HR Service Management, or DevOps connectivity.

Register here ⬇️
AUG Leaders

Atlassian Community Events