Jira Rest API Ticket変更履歴のstatusのみ抽出する方法について

JiraのRest APIを使用して、
チケット履歴情報を取得しようとしています。

チケットの変更履歴を取得する際、
以下の(1)の方法で全履歴情報を取得することはできますが、
(2)のように設定して、statusだけの変更履歴だけを
取得しようとしても、エラーとなります。

(1)https://XXXXX.atlassian.net/rest/api/2/issue/KEY-1001/changelog
(2)https://XXXXX.atlassian.net/rest/api/2/issue/KEY-1001/changelog/changelog?field=status

(1)json形式で取得した結果は以下の通りです。

{
“self”: “https://jast-project.atlassian.net/rest/api/2/issue/GYOUMU-2/changelog”,
“maxResults”: 100,
“startAt”: 0,
“total”: 47,
“isLast”: true,
“values”: [
{
“id”: “12387”,
“author”:

{ :(省略) }

,
“created”: “2018-11-07T10:25:43.162+0900”, ★
“items”: [

{ “field”: “status”, ★このstatus部分だけ取得したい “fieldtype”: “jira”, “fieldId”: “status”, “from”: “10001”, “fromString”: “To Do”, ★ “to”: “3”, “toString”: “In Progress” ★ }

]
},

上記のstatus項目の★印部分のみ
取得したく、質問させて頂きました。

1チケット当り、履歴情報が60件程あり、
2000件のチケットから履歴情報を全て
参照して、
status情報をEXCEL(VBA)で取得しようとすると、
25分程度かかるため、処理時間を少なく
したいため、
上記のstatus情報だけを取得できないか、
ご教示願います。

Hi @h.kawakami,

Thank you for posting to the Atlassian Developer Community.
Not many people in our community speak Japanese so I used Google Translate to turn your question into English. I hope that will help you finding an answer. I would recommend using English though, if possible.

Title: Jira Rest API Ticket About how to extract only the status of change history

Content:

Using Jira’s Rest API,
You are about to retrieve ticket history information.

When acquiring the change history of the ticket,
Although it is possible to acquire all the history information by the method of (1) below,
Set it like (2), only change history of status
Even if you try to acquire it, it will result in an error.
(1)https://XXXXX.atlassian.net/rest/api/2/issue/KEY-1001/changelog
(2)https://XXXXX.atlassian.net/rest/api/2/issue/KEY-1001/changelog/changelog?field=status

The results obtained in the json format are as follows.
{
“self”: “https://jast-project.atlassian.net/rest/api/2/issue/GYOUMU-2/changelog”,
“maxResults”: 100,
“startAt”: 0,
“total”: 47,
“isLast”: true,
“values”: [
{
“id”: “12387”,
“author”:
{ :(省略) }
,
“created”: “2018-11-07T10:25:43.162+0900”, ★
“items”: [
{ “field”: “status”, ★このstatus部分だけ取得したい “fieldtype”: “jira”, “fieldId”: “status”, “from”: “10001”, “fromString”: “To Do”, ★ “to”: “3”, “toString”: “In Progress” ★ }
]
},

Only the ★ mark of the above status item
I wanted to acquire, I asked you a question.

About 60 tickets per ticket,
All history information from 2000 tickets
In reference to,
When trying to acquire status information with EXCEL (VBA)
It takes about 25 minutes, so processing time is reduced
Because I want to,
You can not acquire only the above status information,
Please teach.

1 Like

Dear Peter Van de Voorde,

Thank you for translating English.
If you post in the future, be careful to post in English.

Hello @h.kawakami,

If I understood the question properly, it seems you want to return only the change logs related to status field in order to process the response faster by having a shorter response body. Currently, this is not yet supported and I created a feature request on your behalf. Please check and vote for ACJIRA-1675.

今後ともお引き立てのほど、よろしくお願い申し上げます.

Ian