プロジェクト

全般

プロフィール

Vote #80722

完了

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

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Projects_11
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
11
version_id:
160
issue_org_id:
33083
author_id:
259873
assigned_to_id:
332
comments:
7
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
127
ステータス-->[Closed]

説明

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

!{width: 70%; border: 1px solid #ccc}projects.png!

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.


journals

I have attached a patch to fix this problem.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Looks good to me.
--------------------------------------------------------------------------------
Committed the fix. Thank you for catching and fixing the issue.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,29482,Query system for Projects page

Admin Redmine さんが3年以上前に更新

  • カテゴリProjects_11 にセット
  • 対象バージョン4.1.1_160 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0