プロジェクト

全般

プロフィール

Vote #79674

未完了

Show parent projects when filtering in the project jump box

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
UI_10
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
32
issue_org_id:
30071
author_id:
105821
assigned_to_id:
0
comments:
5
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Attached patch returns parents projects to matched projects when filtering in the project jump box (improves #23310)

It looks like this:
!redmine-show-parent-projects-jump-box.png!

This solves a problem when having several projects with identical or similar names and project hierarchy is used to distinguish between them. E.g. when using one parent project as a container for business projects and another for the software development part of same project.

Also included is a related patch that marks the current project.


journals

It is an interesting improvement.

I tried out the patch. But parent projects were displayed in not grey but black. And the checkmark for the current project was not displayed even after applying the patch 0002-Mark-current-project-when-filtering-project-jump-box.patch.

Could you check the patch again? My browsers are Firefox and Chrome for Mac.
--------------------------------------------------------------------------------
The original patch uses on font-weight to grey out the non-matched parent nodes. This relies on the used font to provide the font-style which often it does not. Just realised this as I tested on Windows.

Supplied patch uses "color" instead.

As for not marking the currently selected project, I'm not sure what causes this. I have just copied the functionality from the existing logic that marks the current project on the first page load (i.e. not filtering). Does that work for you?
--------------------------------------------------------------------------------
LGTM. Setting the target version to 4.1.0.
--------------------------------------------------------------------------------
I like the idea of the patch, but I'm worried about the proposed implementation that retrieves every time all the projects visible to the user (ignoring the q parameter). That means more time required to return the project searched by the user on instances with a lot of projects.

The change about I speak is the following one:
<pre><code class="diff">
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index a43038a..9fbddf2 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -66,10 +66,14 @@ class ProjectsController < ApplicationController
respond_to do |format|
format.js {
if params[:q].present?
- @projects = Project.visible.like(params[:q]).to_a
+ @projects = Project.visible.to_a
else
@projects = User.current.projects.to_a
end
</code></pre>

Maybe is it enough to show only the parent project? If not, at least we should confirm the proposed change with Jean-Philippe.

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

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

Admin Redmine さんが約2年前に更新

  • カテゴリUI_10 にセット
  • 対象バージョンCandidate for next major release_32 にセット

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

いいね!0
いいね!0