Project

General

Profile

Actions

Defect #33083

closed

Projects filter "Subproject of" does not work when the given value is "My projects" or "My bookmarks"

Added by Mizuki ISHIKAWA about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Projects
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Reproduction steps:
  • Use PostgreSQL
  • View projects/index
  • Add "Subproject of" filter
  • Set the operator of the "Subproject of" filter to "is" or "is not"
  • Set the value of the "Subproject of" filter to << my projects >> or << my bookmarks >>
  • Apply => An exception occurs

Error message:

ActiveRecord::StatementInvalid (PG::InvalidTextRepresentation: ERROR:  invalid input syntax for integer: "mine" 
LINE 1: ...rojects.status <> 9) AND ((projects.parent_id IN ('mine'))) ...
                                                             ^
: SELECT "projects".* FROM "projects" WHERE (projects.status <> 9) AND ((projects.parent_id IN ('mine'))) ORDER BY projects.lft ASC):

app/controllers/projects_controller.rb:57:in `block (2 levels) in index'
app/controllers/projects_controller.rb:53:in `index'
lib/redmine/sudo_mode.rb:64:in `sudo_mode'

Executing the SELECT statement without converting << my projects >>('mine') and << my bookmarks >>('bookmarks') to actual ids is the cause of this problem.


Files

projects.png (37.4 KB) projects.png Mizuki ISHIKAWA, 2020-03-03 08:57
fix-33083.patch (2.03 KB) fix-33083.patch Mizuki ISHIKAWA, 2020-03-03 09:00

Related issues

Related to Redmine - Feature #29482: Query system for Projects pageClosedJean-Philippe Lang

Actions
Actions

Also available in: Atom PDF