Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter broken #27

Open
2 tasks
IBwWG opened this issue Jun 13, 2016 · 8 comments
Open
2 tasks

Filter broken #27

IBwWG opened this issue Jun 13, 2016 · 8 comments

Comments

@IBwWG
Copy link

IBwWG commented Jun 13, 2016

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

@larsiusprime
Copy link
Owner

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

@IBwWG
Copy link
Author

IBwWG commented Jun 13, 2016

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
Copy link
Author

IBwWG commented Jun 13, 2016

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

@IBwWG
Copy link
Author

IBwWG commented Jun 13, 2016

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
Copy link
Author

IBwWG commented Jun 13, 2016

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
Copy link
Author

IBwWG commented Jun 13, 2016

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
Copy link
Author

IBwWG commented Jun 13, 2016

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

@arperry
Copy link
Contributor

arperry commented Jun 14, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants