How to query the Jira database for issue type statistics per project

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く


The SQL queries in this article are only provided on best-effort basis and are not supported by Atlassian.

要約

Admins may want to pull statistics of how many issue types there are per project in Jira. 

ソリューション

Run the SQL query: 

(warning) This query was written for Postgres and may have to be updated to work on another database:

SELECT p.pkey, it.pname, COUNT(i.id) FROM jiraissue i 
INNER JOIN project p ON i.project = p.id 
INNER JOIN issuetype it ON it.id = i.issuetype 
GROUP BY (p.id, it.id) ORDER BY p.pkey, count DESC;

Here's a sample output of the results from a test system: 

    pkey    |      pname      | count
------------+-----------------+-------
 ITSRVDSK   | Service Request |    35
 ITSRVDSK   | Incident        |     4
 ITSRVDSK   | Task            |     3
 ITSRVDSK   | Change          |     2
 ITSRVDSK   | Problem         |     1
 PMGMT      | Task            |     6
 SCRUMMY    | Story           |    36
 SCRUMMY    | Sub-task        |    10
 SCRUMMY    | Bug             |     4
 SCRUMMY    | Epic            |     2
 SCRUMMY    | Task            |     1
 SCRUMMY    | Initiative      |     1
 SCRUMMYTWO | Story           |    16
 SCRUMMYTWO | Bug             |     4
 SCRUMMYTWO | Sub-task        |     3
 SD         | Service Request |    32
 SD         | Incident        |     5
 SD         | Change          |     2
 SD         | Problem         |     1
(19 rows)



最終更新日: 2023 年 10 月 31 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.