I am trying to use groovy script to pull issues and their change history for only certain fields (label, summary, status and a custom field) going back only a certain time frame (most likely using 3 months). I found this (https://docs.atlassian.com/software/jira/docs/api/7.6.1/com/atlassian/jira/issue/changehistory/ChangeHistoryManager.html) which shows how to pull issue history from a certain date and also for certain fields, but I can't use a specific date. I can't upload a new template to Jira each time with an updated date. Instead, I want to just pull the history going 3 months back from the current date at the time of export. And I want to only pull specific fields changed. I am using excel for this, so I want one column with the label, another with issue name (summary), another column with the field changed, and then a final column with the new value the field was changed to. I am looking for this (including the repeating but I can do that with macros as well) but narrowed down fields to avoid such a large export (https://www.midori-global.com/products/better-excel-exporter-for-jira/server/export-samples/jira-issues-excel-reports-with-comments-worklogs-history). Looking for groovy script for each column. Thank you!!
Hi, @Marleah Perry
Welcome to Atlassian Community.
You can try this code, that I made for similar tasks:
https://github.com/Udjin79/SRUtils/blob/master/org/evisaenkov/atlassian/library/HistoryOperations.groovy
You can pull history entries by custom field. Also you can write additional code to look at change date and filter only required changes.
Thank you!!
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.