JMCF - custom field not being indexed by Jira

Krzysztof Kiser September 10, 2020

Hi folks, 

 

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. 

1 answer

1 accepted

0 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 10, 2020

Hi Krzysztof,

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.

Krzysztof Kiser September 11, 2020

That totally makes sense, although it would be good to have an ability to schedule a re-index at least once a day. This wouldn’t be very helpful for time calculations, but at least it would be useful for date calculations. 

 

Anyway, thanks for the help. 

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 11, 2020
Andrej Kvasnica July 15, 2021

David,

we have similar 'issue not being reindexed' problem, the database field is updated but jira does not reindex the issue. This causes problem in search based on that field.

Do you have an idea how to fix this?

Thanks,

a.

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 15, 2021

Hi @Andrej Kvasnica 

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.

David

Andrej Kvasnica July 15, 2021

Hello,

sorry, my bad - it's Power Database Fields, not JMCF. But the idea is same - the issues are not re-indexed upon change of database field (through the JIRA edit issue).

a.

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 15, 2021

It could be a bug in that app - did you ask their support?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events