current value of custom field in database

I'm sure I'm just missing something obvious, but where in the JIRA database is the current value of a custom field.  I thought it was in the jiraschmea.customfieldvalue table, but it appears the value stored there is the original value and not the current value.

1 answer

0 vote

Nope, it's in customfieldvalue.

But, you shouldn't be reading the database, as there's caching and it's not in the slightest bit suitable for reporting.

I may need to elaborate.  I'm talking about the value of a custom field on a specific issue.  If I got in through JIRA and look at the issue, it shows the current value we want, that it was set to a few weeks ago.  If I look in the jiraschema.customvalue field for that issue, it still shows the value of the custom field as what it was originally, before it was changed a few weeks ago. 

In addition, can you elaborate on why "it's not in the slightest bit suitable for reporting"?  We probably aren't reporting off the database in the way you would think, but I want to make sure I understand what the concerns are.

The reporting concern is simply that it's not built for it.  If you want something to read the entire content of a single issue for reporting purposes, you may have to join up to 25 tables, and make several hundred reads to get everything.  That's clearly not optimised for user or business reporting.  If you're looking for other reasons, and approaching it from a very specific angle, it's fine.  But for what most users think of as "reporting", no.  Use the API, where you can say "show me this issue".

Anyway.  Your database question.  I would expect the value to be the current value (caching issues shouldn't last more than a few seconds).  But, where exactly are you looking at the issue? 

(Although, you shouldn't be bothering to read the database.  Is the data in the issue correct?  Can you search and report on it accurately?  Can you get the right result over REST?  If you restored a backup from last night, would you get the same?  If that's all ok, there's no need to look at the database)

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...

92 views 0 1
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