Scripted Fields Won't Update on Refresh (Script Runner/Reindexing)

We have a scripted field that basically checks if another field was updated since the beginning of the day. Here's a screenshot of one of our dashboards:

Selection_001.jpg

This was taken this morning so obviously these issues weren't updated at 9PM today-- the values are residual from yesterday. If I go to the issue and update it, or run a reindex, the "Yes" values here will change back to "No", which is what they should be.

But shouldn't the values update/recalculate every time the issue is loaded? That is what we would like to have.

Thanks,

Kevin

1 answer

1 accepted

1 vote

No. 

It would impose load on the server that could become a problem, but it's not supportable anyway.  JIRA doesn't do "action on view".

It's not quite as simple as this, or even done this way, but you can think of scripted fields as being calculated and stored by the indexing.  They have the calculated value at the time the issue was last updated (or indexed by a script or project/system reindex)

This makes them unsuitable for this sort of display.  This is the sort of activity that should be shifted into javascript so the client calculates the "current" value from a fixed value in the back-end.

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
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

175 views 0 5
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