A Few months ago, I wrote a Script that actually helps to rebuild a deleted field context from Jira custom field. Yes, this ticket JRACLOUD-27957 that has plagued Cloud Instances. My aim was to give some sort of comfort to those users, who accidentally click the "x" button which deletes the context thinking it was a close button.
For you to be able to use this script, you must at least have a little understanding on how to run it on a terminal following the "HOW TO USE" below.
What this Script does:
It can be able to create back a custom field option → How this is done, is a loop through the entire issue key, if an option exist in the changelog history, it will be created.
It rebuilds back the option values on each Jira Issue, by checking the changelog history, identifying the right field and updating the issue with the field value.
If you have deleted the field, this script can also be used to create the custom field.
If you already know the options and have added it as a default value in the custom field context, the field is able to skip rebuilding the options and simply post back the correct value.
HOW TO USE
Download the Script as a module from Github Context Field Rebuilder in order to use. This script uses REST API, so you will need your Atlassian email Address + API token to authenticate your instance.
Save on your Desktop and CD into the directory on your Terminal then run the script by using
$: python3 build.py
$: python build.py
if your machine is already on python 3 and follow the prompt.
Just enter the project key, you would like rebuild. Please enter a valid Project key. example NB For multiple projects, please separate by comma. e.g NB, NGT, TIS
Things to take Note on!
As a rule of thumb, run a test first on a test instance to ensure it meets your requirements before using on a Production Instance.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events