parentsOf returning incorrect results

David Renaud July 22, 2015

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")

1 answer

0 votes
JamieA
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 22, 2015

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?

 

David Renaud July 22, 2015

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

Jozef Kotlár
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 22, 2015

Issue navigator no longer takes values from index - it changed when AJAX-y behaviour was added to Issue navigator (with detaul view?). The only way to check is - Lucene idex browser or exact query like issue=ABC-XX and remainingEstimage=X

JamieA
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 22, 2015

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.

David Renaud July 27, 2015

@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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events