We are trying to run the below query however it is returning some parent issues that do have sub-tasks with estimates on them. It should only return Defects that don't have an estimate and none of their sub-tasks have estimates. Equivalent functions in the JQL tricks plugin (issue in subtask) do return the correct values.
The one oddity is that the correct values will be returned if I re-index all the issues and sub-tasks returned by the filter and then run it again. I have ruled it out as a server index issue because other plugins are able to return the correct values 100% of the time. I believe the parentsOf function is somehow reading old data from the index.
filter = "my filter" AND type = Defect AND status not in (Closed, "Pending Close") AND remainingEstimate is EMPTY AND issueFunction not in parentsOf("filter = \"my filter\" AND remainingEstimate is not EMPTY")
There is only one index, and afaik it's impossible to read old values from the index. I don't know how JQL Tricks works currently, but it used to construct database queries rather than use the index. Perhaps it still does, in which case the index could be wrong but it would return the "correct" issues.
After you reindex, for how long does it return the correct values? Until you make changes to one of the issues that should be returned?
How is the remainingEstimate getting set.... just in the normal way?
It appears to be after adding fresh sub-tasks to Defects that previously would have matched the filter. If you search for the issues and sub-tasks by issuekey the shown columns in the Issue Navigator do have the correct data and AFAIK the Issue Navigator only pulls data from the index. Remaining estimate is added in the normal way through the JIRA UI when the sub-task is created. I am unsure how the JQL tricks plugin works however it does run incredibly slow so it may still query the database. JIRA Version - 6.3.15 Script Runner Plugin Version - 3.1.3
I'm not sure that's the case... the query itself hits the index (not withstanding if there are JQL functions used that specifically hit the database), then the issue that is loaded if you are using the issue-details view is comes from the db, in the normal way. @David, can you try to narrow this down to a simple query involving just one subtask issue, using, "key = ABC-1" ? I feel it's a problem with indexing, but it's not that easy to check, except with Luke, as Jozef suggested, or running a script, or a specific query. If you then edit the issue in question and it works it indicates a problem with indexing.
@Jamie Echlin [Adaptavist] Choosing a specific key does work with the function. It seems to only fail with more complex queries. Editing/re-indexing the issues does solve the issue and my first thought was an indexing issue however all errors I have found so far have been specific to the parentsOf function. I'll keep investigating on my end as I'm unsure either way.
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...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG