crashdumper icon indicating copy to clipboard operation
crashdumper copied to clipboard

Filter broken

Open IBwWG opened this issue 9 years ago • 8 comments
trafficstars

  • [ ] if you select all projects, the default first three statuses, select a type and function from the same project as each other, and a file from a different project, you get a row of data from the selected file (even though it's not the correct type or function)
  • [ ] if you do the above but select all statuses, you get the same row of data (still wrong), except that the project has been replaced by that of the selected error type, which is a data mismatch

This is with PR #24 applied.

IBwWG avatar Jun 13 '16 18:06 IBwWG

FYI you should probably ping @arperry, he's the one I originally commissioned to write this backend.

Adam: not trying to string you into free maintenance work or anything :P, just pointing out you were the author

larsiusprime avatar Jun 13 '16 18:06 larsiusprime

As of now the SQL being output in the second case above is (when pretty-printed):

 SELECT SQL_CALC_FOUND_ROWS *,
                           Count(DISTINCT `reportid`) AS count,
                           r.`errorid`,
                           r.`version`,
                           e.`errorname`,
                           e.`status`,
                           e.`duplicateid`,
                           `projectname`,
                           Min(`time`)                AS firstTime,
                           Max(`time`)                AS lastTime,
                           Min(`intversion`)          AS firstVersion,
                           Max(`intversion`)          AS latestVersion
FROM   `cdbrowser_reports` r,
       `cdbrowser_errortypes` e,
       `cdbrowser_errortypes` e2
       LEFT JOIN `cdbrowser_projects` USING (`projectid`)
WHERE  r.`errorid` = e.`errorid`
       AND e.`status` IN ( ?, ?, ?, ?,
                           ?, ? )
       AND e.`errorid` IN ( ? )
GROUP  BY e.`errorid`
ORDER  BY lasttime DESC
LIMIT  ?, ?  

The corresponding placeholders are being passed as expected--statuses in random order, error ID is the one showing in the row, and limits 0 and 50.

e2 isn't referred to in the select list...since projects is joined on projectid, maybe it's joining on the column from the wrong table...

IBwWG avatar Jun 13 '16 18:06 IBwWG

I guess by @-mentioning him you just pinged him?

IBwWG avatar Jun 13 '16 18:06 IBwWG

Without any parameters to grid.php I get

 SELECT SQL_CALC_FOUND_ROWS *,
                           Count(DISTINCT `reportid`) AS count,
                           r.`errorid`,
                           r.`version`,
                           e.`errorname`,
                           e.`status`,
                           e.`duplicateid`,
                           `projectname`,
                           Min(`time`)                AS firstTime,
                           Max(`time`)                AS lastTime,
                           Min(`intversion`)          AS firstVersion,
                           Max(`intversion`)          AS latestVersion
FROM   `cdbrowser_reports` r,
       `cdbrowser_errortypes` e,
       `cdbrowser_errortypes` e2
       LEFT JOIN `cdbrowser_projects` USING (`projectid`)
WHERE  r.`errorid` = e2.`errorid`
       AND e2.`duplicateid` = e.`errorid`
GROUP  BY e.`duplicateid`
ORDER  BY lasttime DESC
LIMIT  ?, ?  

...which displays everything correctly

IBwWG avatar Jun 13 '16 18:06 IBwWG

Part of the problem may be that even though I have only one line in each box selected, what's getting passed to the server is "1,2,3,7" for exception[] and function[], unlike file[] which is just getting "4".

IBwWG avatar Jun 13 '16 18:06 IBwWG

Ah yes, what it seems to be is, if you happen to select the first line in any of the boxes, it sends all of that box's ID numbers. Select any other line and it just sends one ID.

IBwWG avatar Jun 13 '16 18:06 IBwWG

Upgrading to jquery 3.0.0 didn't help.

I'm done with this for now, I'm just happy to be able to see all my crashes unfiltered for the moment :)

IBwWG avatar Jun 13 '16 18:06 IBwWG

It's been something like a year since I last looked at the code. I'm happy someone is getting some benefit out of it, but I don't know how much better I'll do maintaining it than the average member of its target audience. I'm happy to take a look, though.

arperry avatar Jun 14 '16 18:06 arperry