which database table stores custom fields data related to an issue?

I am looking for the database table that stores custom field data for an issue. 



not for update purpose; for understanding how it can be linked to an issue and where it is stored. I am going through the customfield, customfieldvalue tables but not able to connect them to the jiraissue table.

2 answers

1 accepted

The "customfieldvalue" table has a column, "issue", that refers back to jiraissue.id.  The column customfieldvalue.customfield refers to customfield.id.

1 vote
Joe Pitt Community Champion Oct 23, 2015

Do not update it directly; you'll break JIRA.

To expand on that... NEVER change a JIRA database while it's running. Even when it's not, you need to have a *total* understanding of what you're doing, and 99% of the cases I've run into where people use SQL writes simply don't. So they end up going back to a backup. Or worse.

I would argue that a lot. For 8 years i have replaced what should have been enterprise features with SQL hacks. Most hacks have been done with the server shut down, but some things i have done on the fly, with the application-server running (removal of last used agile-boards for instance). The biggest hacks i have done done so far did 1.9million updates ranging 44 tables in confluence, with the server being started up after the changes without issues. Binaya is specifically mentioning not doing updates, and in my book this is as safe as it gets. DISCLAIMER: Shit happens when you party hard, so knowing what you are doing is key to keeping the consistency of the database, and possibly to keeping your job. I warmly recommend dissecting a database dump to make sure all correlated data is changed when a table is updated, and also to ONLY do it on production after verifying that such a change has worked on a cloned environment. Failure to do so might render your knowledgebase/ticketing system beyond repair.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

126 views 0 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you