Filters don't pick changes to status of issues

Amro Hassaan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2016

Received many complaints regarding changes to issues statuses are not reflected immediately in filters after they are changed in issues. For example someone closes a resolved issue but that issue still shows amongest the resolved ones in the filter that grabs the resolved ones. This gets fixed once I kick a reindexing of the system.

Question: is this normal? Is there some tweaking i need to do to indexing to get it to kick on every change? Is DB corrupt? 

 

Thanks

2 answers

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
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 8, 2016

If you're changing issues from the issue navigator results, then no, this is down to caching.  A user runs a filter, then jumps out to change stuff, and comes back to it.  JIRA has no way of knowing if you've changed something that might affect the filter, it's expecting the user to re-run it if they think the results should be updated.  It's not dynamic, it's based on a cache.

Note, that only applies to the current cached data set.  A new run of the filter (or any other) will be correct because they re-read all the data.  You should test that this is the case - if it's not working that way, then yes, you have an indexing problem.

Amro Hassaan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2016

Nic, While I am waiting on the complaint submitter to respond with whether they changed it from filter or not, let me ask you this (coz I am highly doubting something is not correct with our index):

I have developed a tool using scriptrunner that spawns a dialog (using the web fragments) from which user can click on specific criteria (eg select some custom fields of interest for example) and then that dialog goes back to a Rest Endpoint that looks up when last time these customfields were updated and calculates since how many days they have not been updated, then that rest endpoint --for each customefield-- updates another customfield with these values of days (# days since last update) and then creates a filter of those issues sorted by these days. For example (issue that has not been transitioned/changed status for a year will show on top with customfield 'days since last transition' with value of 365). Now sometimes the generated filter retrieves NO issues (despite the # of days has been calculated and saved in the custom field). I kick reindex and refresh the filter and then issues show with their values.

my Question is: Should I expect this to run correctly and everytime a value is changed in an issues and that issue is queried, should it show immediately? IOW, does these new values in customefields (#days) get indexed immediately or should I expect a lag.

How does the index work? 

Sorry for lengthy description and thank you

Nic Brough -Adaptavist-
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 10, 2016

Sounds like your process isn't updating the index for the issues at the right time.

JIRA will index on any updates made through the UI or REST, but if you're doing things with scripts or code, that needs to trigger the indexing too

Amro Hassaan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2016

aha...thank you so much for explaining this to me...sort of solved a mystery that existed for a while smile.  

Appreciate your help.

 

1 vote
Jeff Louwerse
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2016

Are you using any kind of post function to set values?  If so you probably need to reindex in the post function as well.  I have seen this when i incorrectly do my post function and while it saves my updates, the normal reindex call indexes only the values updated by the  transition and not the ones updated by my post function.

 

defining my issue in the post function to this seems to fix this. 

MutableIssue issue       = (MutableIssue) getIssue(transientVars);

 

if all else fails, reindex the issue at the end of your post function.

Amro Hassaan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2016

Thanks Jeff for this tip. It is not post function..but good to know to keep that in mind. 

 

Suggest an answer

Log in or Sign up to answer