Project

General

Profile

Actions

Defect #1165

closed

filtering issue problem

Added by Sergio Freire almost 16 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
Start date:
2008-05-02
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hello.
Im using redmine 0.7, which was migrated from a previous 0.5.0 version.
When I go to Issues and filter by "Status => All", it gives an internal error.
Looking at mongrel logs, I can see the generated SQL:

SELECT count(DISTINCT issues.id) AS count_all FROM issues  LEFT OUTER JOIN issue_statuses ON issue_statuses.id = issues.status_id  LEFT OUTER JOIN projects ON projects.id = issues.project_id   WHERE (issues.project_id = 17 AND (issues.status_id IS NOT NULL AND issues.status_id <> ''))

Since status_id is an integer, I think the expression is not ok at the end.
In that case, it should maybe even not be there.

Maybe it has to do with this line in the Redmine code?

@issue_count = Issue.count(:include => [:status, :project], :conditions => @query.statement)

Im using a posgresql 8.2.4 backend on a Centos 5 (RHAS5)

Actions

Also available in: Atom PDF