What is the logic on this filter? I only ever get one page - sure there should be more than that
The query by itself is correct. The problem is in COUNT
query which should return the total number of rows:
SELECT COUNT(*)
FROM `jtr_issues` AS `a`
LEFT JOIN jtr_status AS s ON a.status = s.id
LEFT JOIN `jtr_issues_tests` AS `it`ON a.id = it.item_id
WHERE `a`.`project_id` = 1
AND `a`.`status` = 1
AND `s`.`closed` = 0
AND `a`.`has_code` = 1
AND `it`.`result` = 1
GROUP BY a.issue_number
HAVING COUNT(it.item_id) = 1
We are using GROUP BY
so the count returns the count of unique values for the group by clause. But the result should be the row count. I was searching for the answer, but have not found it yet. If someone can help in this case it would be great, because I am not so good in SQL queries :(
Labels |
Added:
bug
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-12-03 18:32:19 |
Hmm it is the same logic as for all filters and there is no limit in this query. I will try to ensure that query is correct.