Hello there!
I need to create a report to determine the issue types that are not currently in use in our JIRA server instance (8.13).
I have access to query the postgres database (psql 9.2.24, server 11.13), the problem is that I'm not very good with SQL.
I was able to retrieve the issue types that are not currently in use, but I need to retrieve more than that.
The ideal report would contain the following information:
Issue Type | Jira Project | Project lead | number of issues | date of last issue created
Could someone help me with the query to get this information? I understand that some of the columns may be difficult to get (like "date of last issue created" per issue type), so if you provide a query that gets me some of the columns but not all of them it would be super ok as well.
Thanks in advance!
Hi all,
I'm still looking to get the data as I stated in my previous comments. In this quest I found something in this post.
The query returns project key, project lead, and last updated. I had to modify the query so it could work on my postgres version, here it is:
SELECT DISTINCT p.pkey,p.LEAD,MAX(i.UPDATED) as "Last Updated" FROM jiraissue i INNER JOIN project p ON p.ID = i.PROJECT GROUP BY p.pkey,p.LEAD ORDER BY MAX(i.UPDATED) ASC;
I hope this helps
I would very strongly recommend that you stop looking at the database. It's not designed or intended for reporting and unless you have a good understanding of it, and decent SQL knowledge, you are quickly going to be building queries that are hideously complex, non-performant and probably just plain wrong.
I've recently run into a query that we had to tell the client "the best thing you can do is remove access to the database from this user" - it was over 3,000 characters long, included 40 joins, and was the reason they had performance issues with their Jira. It was reading for a single issue, and giving the wrong answer.
You should use the REST API instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd start small with something such as
MySQL [jiradb]> select issuetype,count(issuetype) from jiraissue group by issuetype order by count(*) desc limit 10;
which shows which issue types are used most
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Matt Doar , that was very helpful!
Would there be a way to get the projects in which they are being applied?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again,
I know that I'm asking a lot, but if some SQL master can help me getting this information as well it will be much appreciated!
Custom Field | Issue Type | Jira Project | Project lead | Amount of issues with a value in that custom field | Date of last issue created
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.