You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have a JMCF custom filed that calculates working days between two dates.
The field is updated on the issue screen correctly, but when trying to search for issues with a specific value in the custom field, Jira is not showing correct results. It shows the issues with the value at the time of last Jira re-index.
Is there a way to force Jira to auto re-index when that custom field value is changed?
I have an automation rule that is not working due to the re-indexing not occurring when the field value is changed.
When I force the re-index manually, I can use JQL with no issues to locate issue with a specific value in the custom calculated field.
my guess is that the formula of that calculated field calculates the number of working days between an issue field value (e.g. Created) and now, or another moment of time that is _not_ dependent on just fields of the issue. The problem is that the index entry for an issue is only updated when the issue is modified (edited) or transitioned. Not when time passes (that would mean constantly re-indexing, which is impossible).
As an example, if you're calculating the number of days _since_ issue creation, the value will change between one day and the next, without making any change to the issue itself. Therefore, the index will become obsolete for that issue as time passes.
As for your question: "Is there a way to force Jira to auto re-index when that custom field value is changed?"
The thing is, the calculated field's value only changes... when it is computed. So what you'd want is to force the field to be recalculated constantly - which is equivalent to rebuilding the index for every issue all the time. No doable.
So, no, you cannot use calculated fields whose value is time-dependent in JQL searches.
how is that related to JMCF? If you say that the field is updated in the database, it can't be a calculated field since, by definition, calculated fields are calculated, not stored.