I am trying to make a query that would fetch currently active problems, but I’m struggling with handling multiple of the same display_id. The filters I think will be good enough for me would look like this: | filter event.kind == "DAVIS_PROBLEM" and event.status == "ACTIVE". However, now I need a way to fetch only the latest update of a given problem (to my understanding, the same problem id multiple times means the problem got updated and I only want to consider the problem from the latest snapshot). Thanks in advance!
summarize them by display_id and select the first status. because in the previous step the records are sorted by timestamp, you will get after the summarize the latest problem status
We are using similar query to fetch the problems which are open for more than 15 days.
However, what we are observing is, it is not matching with the count on problem card page.
As per more information received from support, fetch events is fetching the events associated with problem not actual number of problem and problem may have multiple events.
Is it possible to get actual count of problem or if that is not possible, how can we modify above query to match it to actual problem number on problem card page?
Don’t know the details of the conversation you had with support, but with adding
| filter event.kind == "DAVIS_PROBLEM"
to the query, you filter only on problems and not the events related to the problems.
My response from 1st June is already a bit outdated. Since then additional fields have been added to Grail (which are also documented in the release notes) and should also be in the query: problem.dt.davis.is_duplicate, problem.maintenance.is_under_maintenance .
following query should give you a much more accurate result.