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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published yesterday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

446 views 6 7
Read article

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