Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,334
Community Members
 
Community Events
185
Community Groups

A workaround for deleted field context

Edited
Prince Nyeche
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 30, 2020

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 
  • OR
  • $: 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

Current Limitations

  • It takes a long time when it comes to building up context for Larger Projects.
  • It will only build the options / values as long as it exist on the Issue History.
  • There's no last save point if the script accidentally stops, you will need to start back again afresh.

Things to take Note on!

  • Since we're updating the issue via API, the user making the update will display as having made an update on all the issues and the updated time will change to reflect that update.
  • An updated issue event will be sent as notifications. you can temporarily disable this to avoid the notification noise when running this script.

 

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.

1 comment

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 27, 2022

Hi @Prince Nyeche 

What about the Server?

Prince Nyeche
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 28, 2022

Hey @Pramodh M I never tested it on server but I believe with minor modification to the endpoints, you can get it to work on server.

Like Pramodh M likes this
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 28, 2022

Thanks @Prince Nyeche 

Comment

Log in or Sign up to comment