How to list the issues moved from one project to another in Jira

お困りですか?

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

コミュニティに質問


プラットフォームについて: 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 は除く

    

要約

Jira doesn't provide a report on moved issues. Each of the move operations can only be manually verified on each issue's History tab.

If we require a list of all moved issues, we can query the database for that.

環境

All Jira versions.

ソリューション

The below query was written for Postgres. Please modify it in case it doesn't work on your specific database.

select k.oldstring as "Old Key", coalesce(t.oldstring,it.pname) as "Old Type", k.newstring as "New Key", coalesce(t.newstring,it.pname) as "New Type", u.lower_user_name as "Username", kg.created as "Moved date"
from changeitem k
join changegroup kg on kg.id = k.groupid
join app_user a on a.user_key = kg.author
join cwd_user u on u.lower_user_name = a.lower_user_name
join changegroup gt on gt.id = k.groupid
left join changeitem t on t.groupid = gt.id and t.field = 'issuetype'
join jiraissue i on i.id = kg.issueid
join issuetype it on it.id = i.issuetype
where k.field = 'Key';

出力は次のようになります。

  Old Key  | Old Type |  New Key  | New Type | Username |         Moved date         
-----------+----------+-----------+----------+----------+----------------------------
 DEV-6     | Task     | SITEDV-13 | Task     | admin    | 2020-09-08 17:37:20.973-03
 TEAMXS-12 | Bug      | UX-52     | Task     | admin    | 2020-09-14 13:00:53.724-03
(2 rows)

Username being the user who performed the move action on that given date.

If you'd like, you can add a condition to limit the results based on time by adding the following extra condition at the end of the original query:

and kg.created between '2021-02-07' AND '2023-02-15'

To track source or target project, you could use these conditions:

-- Uncomment line below to filter based on source project key
-- and k.oldstring like ('SOURCEPKEY-%')
-- Uncomment line below to filter based on target project key
-- and k.newstring like ('TARGETPKEY-%')

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

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

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