Hi there,
I know this type of question has been asked many times here, but I am stuck on my particular edge case. We have a Cascading Select field that is used throughout our company for business logic. It has over a hundred contexts. Fairly often, requests will be made to add an option (or more) to all contexts in the field. This would be a manual nightmare.
I know there is the most excellent built-in scriptrunner script for bulk updating custom fields options... and I would certainly use that if it could apply to all contexts at once. But alas, it makes me pick one at a time.
I know back in the day, the source for that script was available to look at. I know that is no longer an option. So.. looking at various examples, I started to cobble something together (see below). Right now what I have will iterate through all the contexts and list the Parent and Child options.
What I need help with is the bit where I want to add the new options. Let's say I have:
Foo1
Bar1
Bar2
Foo2
Bar3
Bar4
-- and I want to add those as options to each context. I'm assuming I'd need to put it in some sort of map, and add it to the options that way. But the devil's in the details, and I am hitting a wall.