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://XXXXX.atlassian.net/rest/api/2/issue/KEY-1001/changelog",
"maxResults": 100,
"startAt": 0,
"total": 62,
"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情報だけを取得できないか、ご教示願います。
Hello Hideo and welcome to the community!
The REST endpoint of GET /rest/api/3/issue/{issueIdOrKey}/changelog only have 2 available query parameters. Those parameters are startAt and maxResults. This is most likely why the API response is not acknowledging your attempt at ?field=status. You do have options moving forward.
You may use a script to GET the REST API response and from there parse the data you need within the script. This would allow you to store the JSON response as a variable and only pull out the fields you need to display or report on.
Another option would be to use SQL to ingest the JSON data into a table format. From there you can connect excel to said table and report on the columns you need.
Both methods would require in-house development to create scripts which will allow for communicating with the systems and parsing or storing the data. These scripts would be transferable to other aspects of the API which you wanted to GET data from as well.
If you do want to proceed with one of these methods, please let me know and we can work together to develop something to parse or ingest your data.
Regards,
Stephen Sifers
Google translate:
Dear Stephen Sifers
I'm sorry for the late reply.
Thank you for your advice.
You can Close this question.
Regards,
H.kawakami
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Hideo,
Glad you found the answer helpful.
If the answer helped to resolve your issue or give you direction, please select the 'Accept Answer' button. This will let others know this answer helped you.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.