View Issue Details

IDProjectCategoryView StatusLast Update
0012259mantisbtpreferencespublic2014-09-23 18:05
ReporterEisbaer Assigned Todhx  
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.1 
Fixed in Version1.2.6 
Summary0012259: Default sub-project not selected in extended project browser
Description

When configuration option for extended project browser (showing project and subproject in separate drop down boxes) is ON, and a sub-project is set as the default-project in the users preferences,
then the project and sub-project boxes do not get selected properly after login.

Thus, the project select in the drop down boxes and the interies shown on the overviewpage do not match which is very misleading for the users.

Steps To Reproduce

$g_show_extended_project_browser = ON;

A sub-project is set as default-project in the users preferences.

Login to mantis.

On the page presented, as project "All projects" is selected for the project, the sub-project drop-down-box is empty(!), but the issues for the default-project are presented on the page.
Thus, the user would expect to see an overview of "All projects" which is not the case (it is only the default-project overview).

Additional Information

The problem does not show up, if a project instead of a sub-project is set in the users preferences.

Tagspatch
Attached Files
fix-12259-12x.tar.gz (1,331 bytes)

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
has duplicate 0012600 closeddhx Subprojects behave incorrectly as user default 

Activities

quentinbes

quentinbes

2011-06-20 11:17

reporter   ~0029043

Last edited: 2011-06-20 11:19

I tried something in function print_subproject_option_list of print_api.php, I replaced :

check_selected( $p_project_id, $t_full_id );

by

check_selected( $p_project_id, $t_id );

It seems to work.
Tell me what do you think of my idea.

Eisbaer

Eisbaer

2011-06-22 07:49

reporter   ~0029050

I made the change you suggested, but could not observe a difference in behaviour:
When loggign in, the two dropdownboxes for "project" und "subproject" still do not get selected, when the default-project is a sub-project.

Project shows "All Projects"
Subproject rests empty.

dregad

dregad

2011-06-23 12:40

developer   ~0029054

Attached is a patch for 1.2.x.

Since I added a new API function to retrieve a project's parent which was necessary to properly build the hierarchy in helper_get_current_project_trace when retrieving the current project from the user's preferences, I would appreciate if someone from the development team could review my changes, and if they are acceptable I'll provide the patch for 1.3.x as well.

I also confirm that this issue is indeed a duplicate of 0012600. Testing shows that my patch resolves the behavior both with show_extended_project_browser ON and OFF.

dhx

dhx

2011-07-12 06:09

reporter   ~0029144

Thanks for the patches Damien. I've committed them :)

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036428

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master 33223386

2011-06-23 12:25

Damien Regad

Committer: dhx


Details Diff
Fix 0012259: select user's default project when it's a subproject

Function helper_get_current_project_trace did not properly build the project
hierarchy when initializing the array from the user's preferences

Signed-off-by: David Hicks <d@hx.id.au>
Affected Issues
0012259
mod - core/helper_api.php Diff File

MantisBT: master-1.2.x b8431b59

2011-06-23 12:25

Damien Regad

Committer: dhx


Details Diff
Fix 0012259: select user's default project when it's a subproject

Function helper_get_current_project_trace did not properly build the project
hierarchy when initializing the array from the user's preferences

Signed-off-by: David Hicks <d@hx.id.au>
Affected Issues
0012259
mod - core/helper_api.php Diff File