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

How to update the custom field options if I change them in the database

Max Skarzhinets April 24, 2014

Hi

I change (add new or update) options custom field of type select in database. When I opened JIRA in browser, I have not seen of my changes.

I try use CustomFieldManager.updateCustopField(CustomField updatedField), CustomFieldManager.refresh(), but field options not changed.

Reindexing is also not helped.

Whether there is a function that can update options of custom field, downloading them from the database? I use JIRA 5.2.9

Regards

Max Skarzhinets

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2014

Do NOT amend a Jira database while it is running.

That's pretty much it - you shouldn't have touched the database. Your best approach would be to go to the backup you took before you did this, although reverting the SQL you've run might well be enough to rescue your system.

You also imply you've tried to do some change with code via the API - that is absolutely fine compared with database changes, but we need more information than just the single line of code you think isn't working. What does the log say, what is the rest of the code around that line, where are you running that line of code?

Max Skarzhinets April 24, 2014

I need create custom field of type select. Field options need to synchronize with another system.

I want to create table id database with fields: id option, id option in another system. Then I write code for comparison this options and updating them from another system.

It's the simplest way without writing plugin which will inclusive new custom fields type.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2014

Again, you must NOT write to the database while Jira is running. It will not work. It will damage your data. It could completely break your Jira. Do not do it.

I'm afraid you have no option but to write a plugin or do some difficult scripting to fake what a user does in the UI.

Max Skarzhinets April 24, 2014

OK, thank you.

In that case I'll try to write a plugin.

TAGS
AUG Leaders

Atlassian Community Events