We are in the process of cleaning our db. A customfield we use is a checklist type and it fills the db with values even if the field is not shown in any screen. We restricted the context of the field to 2 projects out of 10 now. The problem is that all the values in the db are still there (it<s a very large volume as each issue have 10-15 entries each of that very same field)
How can I clear theses values ? The bulk edit route could be used but I would have to first put the projects back in context, and to that 1000 issues at a time (16k issues neds to be cleared) and I would have to repeat the same process for other fields in the same situation.
Direct DB edit is out of the question (too risky)
Is there a process in jira, scriptrunner or other to do that cleanup automatically ?
I could write a scriptrunner script to do it fairly easily but we prefer the normal route if available.
If you are willing to try another plugin I could recommend you one that could do the job. Full disclaimer: I am the creator of the plugin.
It's called Time Machine (https://marketplace.atlassian.com/apps/1222498/time-machine?hosting=server&tab=overview) and its purpose is to revert values in fields of your issues back to their state at a given time. I assume, when created, those issues would have no values in this customfield, is that correct? If so, with Time Machine you can easily select a very distant point in the past and clear those values for any issues that you can match with JQL.
Now, with datasets as large as this, the plugin currently struggles a bit on the frontend side so you can either put up with this (the backend will do its job even if the frontend will be laggy) or you can select your issues with JQL in batches of around 2-3k at once. I am currently working on improving the UX in that regard.
Let me know if that is what you were looking for or have any questions.
Hi, it's not exactly what I'm looking for but I find your plugin interesting for other uses. Do you have an API ? Is it possible for example to retrieve an issue object at the state it was at a specific date in the past? This would be useful for us when we generate some reports to compare what happened in issues during the month.
Sorry for misunderstanding the case and thank you for the interest. Yes, retrieving an issue at the state it was on a specific datetime is possible and that is actually the first step before running a revert. The plugin does have a REST API that you can call, however, currently it is not documented.
I have created a page on my Confluence where I will put up the documentation for the API (thank you for the suggestion by the way!): https://ducksoft.atlassian.net/wiki/spaces/TM/pages/154533893/Time+Machine+-+API+overview
I will try to get it up as soon as possible. The API is relatively simple and I will tackle the endpoint to retrieve the data you mentioned first. I will let you know as soon as I am finished with that.
Just to let you know, I have set up the documentation for the purpose that you have described. You should now be able to call the history endpoint and get the issue state at a given point in time. Please refer to: https://ducksoft.atlassian.net/wiki/spaces/TM/pages/154533893/Time+Machine+-+API+overview for more information.
Let me know if you need anything else.