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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Where is the value of a scripted field stored

We would like to create a query on the database involving the customfieldvalue of a scripted field, but apparently it is not stored there.

Where should we find it (if at all persisted)

1 answer

1 accepted

2 votes
Answer accepted

I seem to remember that scripted fields store their results data in the index. (I know that's how derived fields do it, but I could be wrong about scripted fields and they build it on-the-fly whenever it's needed)

I'm afraid that if you're reporting off the database, then the only real answer is to duplicate the work the scripted field does in your reporting.

Yep... if you need a second opinion, Nic is correct. Scripted fields extend Calculated Fields, which have no value in the database.

You can export all to excel and do your aggregate calculation in that, or write a raw lucene query and do some calculation on those results...

It is possible to retrieve sript code from database? Where Script Runner store script code?

Like Raul Pelaez likes this

It's important to know how the code of the script field is stored in Jira because there is a bug that after Jira reindex sometimes all code source of Scriptfields dissappears and it's very annoying and ugly

If you're randomly losing scripts like that, you need to be looking at the rogue application or script that is trashing your data, not patching over it by taking backups and manually re-entering scripts.  Neither Jira nor Scriptrunner have code that would delete scripts during indexing.

They're held in the AO tables that SR adds to Jira when you install it.

I think I can reproduce the bug if I change the code of some script field during a hard index of Jira. Is possible?

Thanks Nic

I do not know - I've never seen that happen before, without someone tinkering in the database.

I remember see a similar bug if you edit two script fields at same time (in different tabs in browser). Is possible?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

How to log work and track time in Jira when a person is part of multiple teams

  The manager’s daily activities include a list of challenges to reach high levels of efficiency for their teams. Part of these challenges is related to how to deal with the worklog systems sin...

117 views 2 2
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you