I'm looking to programmatically add values to a customfield that is a select list (single) and I don't see an API in Jira Software Data Center that allows that like there is in Jira Cloud. Is it possible to add the value to the customfieldoption table directly?
Use case: In a multi-tenant environment, clients register themselves as a program of record within the system using Jira Servicer Management. All follow-on tickets for this program can then pick their program from the list of values in the Program of Record field.
Intent: There is no human in the loop required as the requests are handled by Jira Automations which invokes a web hook to our Jenkins. Jenkins takes all the necessary steps to onboard a program. This is where I'd like to update the customfieldoption.
I see, Database – Custom fields (atlassian.com), that there is an ID field that looks to be a sequence number, but it it's not clear if this is an autoincrement field or if there is a separate sequence table I have to retrieve a sequence number from.
...or perhaps there is a better way?
Hi @Adam Long
Welcome to the community.
This can't be done in Server/DC
There is an open feature request for this you can vote for, see JRASERVER-36112
Thanks for the response...
Have you tried to do it through the database directly? I understand the REST API is not available as I mentioned in my original post. The request you mentioned has been open for over 10 years, which gives me little hope that it will be worked.
At the end of the day, any REST API is going to facilitate updating those tables. Perhaps there is more to these tables that makes it tricky?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Adam Long
No I didn't, I would't do this via the DB directly as well.
This could cause DB issues and could bring your instance down. I would say make a db backup before, but you will still lose updates on issues done in the period you make the change and if it will fail.
You could have a dev instance setup to try it on, but best practice under Admins is DON"T MESS WITH THE DB DIRECTLY
You could switch to Cloud, as the API there has the option and server is EOL in 2 days.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.