View Issue Details

IDProjectCategoryView StatusLast Update
0026888mantisbtcode cleanuppublic2020-10-06 04:36
Reporterdregad Assigned Todregad  
PrioritynormalSeveritytweakReproducibilityN/A
Status resolvedResolutionfixed 
Target Version2.25.0Fixed in Version2.25.0 
Summary0026888: Refactor printing of project selection menus
Description

While working on fixing 0026887, I realized that the code to display the project name and link to set_project.php in the project selection menu (layout_navbar_projects_menu()) and the project menu bar print_project_menu_bar() is very similar, and repeated several times (as we need to handle the ALL_PROJECTS and subprojects cases).

It would make sense to move the logic to a dedicated function to reduce code duplication.

Additional Information

This was inspired by the analysis for 0026886:0063843.

TagsNo tags attached.

Relationships

related to 0026886 closeddregad How to add new issue count to the projects bar? 
related to 0026887 resolveddregad Project Menu Bar does not indent subprojects properly 
related to 0027375 resolveddregad search field at project-selection is not working anymore 

Activities

Related Changesets

MantisBT: master edb40eab

2020-04-18 06:41:44

dregad

Details Diff
Function to display formatted project selection links

New project_link_for_menu() function added to Project API, to avoid code
duplication when displaying project selection links in the navbar menu
and the project menu bar.

Handles the indentation logic based on the subproject's level in the
hierarchy, selection of the active project as well as context-specific
formatting ($p_class parameter).

Fixes 0026887, 0026888
Affected Issues
0026887, 0026888
mod - core/html_api.php Diff File
mod - core/layout_api.php Diff File
mod - core/project_api.php Diff File

MantisBT: master aaa5807d

2020-10-06 04:34:10

dregad

Details Diff
Fix search in project selector

Commit edb40eabd5299d5fe4c4a23865ff3523d020b6f5 (issue 0026888) introduced
a regression causing the filtered projects list to always be empty,
regardless of what the user typed in the Search field.

The bug was caused by a typo in CSS class name (`project_link` instead
of `project-link`).

Fixes 0027375
Affected Issues
0026888, 0027375
mod - core/layout_api.php Diff File

Issue History

Date Modified Username Field Change
2020-04-18 05:52 dregad New Issue
2020-04-18 05:52 dregad Status new => assigned
2020-04-18 05:52 dregad Assigned To => dregad
2020-04-18 05:53 dregad Relationship added related to 0026886
2020-04-18 05:53 dregad Relationship added related to 0026887
2020-04-18 07:01 dregad Note Added: 0063846
2020-05-02 15:13 dregad Changeset attached => MantisBT master edb40eab
2020-05-02 15:13 dregad Status assigned => resolved
2020-05-02 15:13 dregad Resolution open => fixed
2020-05-02 15:13 dregad Fixed in Version => 2.25.0
2020-10-05 15:00 atrol Relationship added related to 0027375
2020-10-06 04:36 dregad Changeset attached => MantisBT master aaa5807d