Patch #34595

Filter list of recent projects in the project jump box

Added by Holger Just about 1 month ago. Updated 11 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Projects
Target version:4.1.2

Description

The attached patch makes sure that only currently visible projects are included in the project jump box, removing archived projects and projects the user is not allowed to view anymore.

The patch should apply cleanly on current trunk.

0001-Only-show-currently-visible-projects-in-the-project-.patch Magnifier (826 Bytes) Holger Just, 2021-01-14 20:30

Associated revisions

Revision 20735
Added by Go MAEDA 29 days ago

Only show currently visible projects in the project jump box (#34595).

Patch by Holger Just.

Revision 20736
Added by Go MAEDA 29 days ago

Reverts r20735

History

#1 Updated by Marius BALTEANU about 1 month ago

  • Target version set to 4.1.2

#2 Updated by Go MAEDA 29 days ago

  • Category set to Projects
  • Status changed from New to Resolved
  • Assignee set to Go MAEDA

Committed the fix. Thank you.

#3 Updated by Go MAEDA 29 days ago

  • Assignee deleted (Go MAEDA)

The patch lacks one dot after "visible". Here is an updated patch.

Index: lib/redmine/project_jump_box.rb
===================================================================
--- lib/redmine/project_jump_box.rb    (リビジョン 20737)
+++ lib/redmine/project_jump_box.rb    (作業コピー)
@@ -31,6 +31,7 @@
     def recently_used_projects
       project_ids = recently_used_project_ids
       Project.where(id: project_ids).
+        visible.
         index_by(&:id).
         values_at(*project_ids). # sort according to stored order
         compact

#4 Updated by Holger Just 29 days ago

Ah sorry :(

I extracted the patch from our internal Redmine version where we have other changes in this code area. Your updated patch should work.

#5 Updated by Go MAEDA 11 days ago

  • Status changed from Resolved to New

Also available in: Atom PDF