View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007933 | mantisbt | filters | public | 2007-05-02 09:16 | 2008-08-12 09:17 |
Reporter | edwardgao | Assigned To | grangeway | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 1.1.0a2 | ||||
Summary | 0007933: Filter does not work as expected | ||||
Description | When we "Apply Filter" on a key word, it looks like Mantis is calculating the total number correctly, but it won't show all the issues with the keyword. it always hide some issues. In this way, the search function is not useful at all, because you can not guarantee what you get is what you need. | ||||
Steps To Reproduce |
In this case, there is no way to see the 4~6 issues. | ||||
Additional Information | This was reported in the wrong category, but I could not move it myself. Some sql output looks fine: 13 0.0249 SELECT DISTINCT mantis_bug_table.id AS id FROM mantis_bug_text_table, mantis_project_table, mantis_bug_table INNER JOIN mantis_bugnote_table ON mantis_bugnote_table.bug_id = mantis_bug_table.id INNER JOIN mantis_bugnote_text_table ON mantis_bugnote_text_table.id = mantis_bugnote_table.bugnote_text_id WHERE mantis_project_table.enabled = 1 AND mantis_project_table.id = mantis_bug_table.project_id AND ( mantis_bug_table.project_id in (2, 3, 4, 5, 6, 7, 1) ) AND ( mantis_bug_table.status in (10, 20, 30, 40, 50, 60, 80) ) AND (mantis_bug_text_table.id = mantis_bug_table.bug_text_id) AND ((summary LIKE '%test%') OR (mantis_bug_text_table.description LIKE '%test%') OR (mantis_bug_text_table.steps_to_reproduce LIKE '%test%') OR (mantis_bug_text_table.additional_information LIKE '%test%') OR (mantis_bug_table.id LIKE '%test%') OR (mantis_bugnote_text_table.note LIKE '%test%')) 14 0.1050 SELECT DISTINCT mantis_bug_table.* FROM mantis_bug_table WHERE mantis_bug_table.id in (SELECT DISTINCT mantis_bug_table.id AS id FROM mantis_bug_text_table, mantis_project_table, mantis_bug_table INNER JOIN mantis_bugnote_table ON mantis_bugnote_table.bug_id = mantis_bug_table.id INNER JOIN mantis_bugnote_text_table ON mantis_bugnote_text_table.id = mantis_bugnote_table.bugnote_text_id WHERE mantis_project_table.enabled = 1 AND mantis_project_table.id = mantis_bug_table.project_id AND ( mantis_bug_table.project_id in (2, 3, 4, 5, 6, 7, 1) ) AND ( mantis_bug_table.status in (10, 20, 30, 40, 50, 60, 80) ) AND (mantis_bug_text_table.id = mantis_bug_table.bug_text_id) AND ((summary LIKE '%test%') OR (mantis_bug_text_table.description LIKE '%test%') OR (mantis_bug_text_table.steps_to_reproduce LIKE '%test%') OR (mantis_bug_text_table.additional_information LIKE '%test%') OR (mantis_bug_table.id LIKE '%test%') OR (mantis_bugnote_text_table.note LIKE '%test%'))) ORDER BY sticky DESC, last_updated DESC, date_submitted DESC 15 0.1198 SELECT DISTINCT bug_id,MAX(last_modified) as last_modified, COUNT(last_modified) as count FROM mantis_bugnote_table WHERE mantis_bugnote_table.bug_id in (SELECT DISTINCT mantis_bug_table.id AS id FROM mantis_bug_text_table, mantis_project_table, mantis_bug_table INNER JOIN mantis_bugnote_table ON mantis_bugnote_table.bug_id = mantis_bug_table.id INNER JOIN mantis_bugnote_text_table ON mantis_bugnote_text_table.id = mantis_bugnote_table.bugnote_text_id WHERE mantis_project_table.enabled = 1 AND mantis_project_table.id = mantis_bug_table.project_id AND ( mantis_bug_table.project_id in (2, 3, 4, 5, 6, 7, 1) ) AND ( mantis_bug_table.status in (10, 20, 30, 40, 50, 60, 80) ) AND (mantis_bug_text_table.id = mantis_bug_table.bug_text_id) AND ((summary LIKE '%test%') OR (mantis_bug_text_table.description LIKE '%test%') OR (mantis_bug_text_table.steps_to_reproduce LIKE '%test%') OR (mantis_bug_text_table.additional_information LIKE '%test%') OR (mantis_bug_table.id LIKE '%test%') OR (mantis_bugnote_text_table.note LIKE '%test%'))) GROUP BY bug_id | ||||
Tags | No tags attached. | ||||
I find out the reason, but still need help. The reason is that I changed the filter.php for MSSQL performance issue when there are more than 3000 records. If I do not change, Mantis won't return anything for me, but after I change these, Mantis can not filter well. What do you think it is to cause the trouble, the changes are:
$t_where = "WHERE $t_bug_table.id in (" . implode( ", ", $t_id_array ) . ")";$t_where = "WHERE $t_bug_table.id in (" .$query. ")";
|
|
Please add a relationship between this and issue 7516. http://bugs.mantisbt.org/view.php?id=7516 If I remove the 3 changes, the filter works well. |
|
It was the first change that caused the trouble:
$t_where = "WHERE $t_bug_table.id in (" . implode( ", ", $t_id_array ) . ")";$t_where = "WHERE $t_bug_table.id in (" .$query. ")"; Do not know what the other two changes will cause yet. |
|
(See note on other bug for resolution) |
|
Am I correctly interpreting that this bug was raised by the modifications suggested in 0007516, so I can close this as it is nowhere to be found in any official release (let alone the stated 1.1.0a2) ? |
|
Indeed, this is a defect in no official release, but in an unofficial patch that I made. That being said, many people who use Mantis on mssql are using my unofficial patch, because the performace is terriable without it. Feel free to close this issue. |
|
MArking as resolved, as I believe the logic changes in trunk for 1.2.x (see other bug) deal with this. |
|