I recently went through my custom fields that are driven by scripted fields through scriptrunner and added a context to reduce the load on our Jira instance. Unfortunately this made all the fields no longer appear on jira tickets.
How I added a context
I have gone back to our test instance to fiddle around with "adding" my context in a different way, and instead of creating a net new context for the custom field and deleting the default one on the custom field, instead, I directly modify the default one to be what I want. This works and the fields continue to show up on the issues that I expect, but unfortunately in our production instance I am not in a state where I can "bring back the default context and modify it" since I have already deleted the default contexts.
Some other debugging that I have done.
Is there something I'm missing here that is special about scripted fields or custom field contexts? Since I know that changing the default context will make this work again, I can go the route of completely deleting each one of these scripted fields and custom fields and re-creating them, but I'm unsure if I'll be able to get the same name of the field back if I try to recreate the field after deleting. Since multiple of our JQL filters that drive other widgets use this custom field name, it's important that the name stays the same, at least. Also other integrations to these fields that list them as a parameter to show (such as displaying this field in a filter results macro) will probably delete that option from showing at the time I delete the field (and before I recreate it), meaning there will be maintenance across many place I don't even know about to readd this to the macro(s) - so I would rather not take this route if I can avoid it.
Any suggestions on how I can get out of this mess?
@Phillip Saindon , it seems that when one changes the field configuration name, it borks out the script. I do hope you have all the scripts somewhere as the fix is to simply put them back in.
Note also that Jira does allow duplicate field names so you could use precisely the same name if you needed to (and is part of the dumpster fire I inherited that I am still cleaning out). However, when testing here, found that simply putting the script back in the existing fields solved the problem
I'm late to the game here, sorry, but there are some quirks with scripted fields and contexts. I've seen a bug (no idea if it was SR or Jira or a compound thing) where the searcher changed when you changed a scripted field context, which broke them in interesting ways.
So I'd want to check searchers were correct, and then, second, which seemed to fix all the other problems I'd had, re-index everything (background, you don't need the full locking one)