View Issue Details

IDProjectCategoryView StatusLast Update
0008453mantisbtbugtrackerpublic2009-06-26 12:07
Reporterjreese Assigned Tojreese  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.0rc1 
Target Version1.1.0rc2Fixed in Version1.1.0rc2 
Summary0008453: Sub-project My View highlights all issues as recent
Description

The My View page incorrectly highlights all issues as recent when viewing the page with a sub-project selected. The problem is due to My View page incorrectly using the user's default filter information (rather than the view's filter), which returns as boolean false when a sub-project is selected.

There are really two problems at play here:

  • The Current User API call current_user_get_bug_filter() returns false when sub-projects are selected.
  • The My View page does not use the views' filter information at all when choosing how to highlight recent issue, among other things.

The solution for the My View page at least is to check for boolean false from current_user_get_bug_filter() and to set a blank array in its place, and then to merge the user's filter with the views' filters, with the user's filter taking precedence. This solution is attached as a patch, but will be submitted to CVS shortly.

The solution for current_user_get_bug_filter() is not yet known by me.

Steps To Reproduce

Select a sub-project.
Switch to the My View page.

TagsNo tags attached.
Attached Files
mantis_myview_2007-10-09.patch (749 bytes)   
diff --git a/core/my_view_inc.php b/core/my_view_inc.php
index c8f311b..9ac6170 100644
--- a/core/my_view_inc.php
+++ b/core/my_view_inc.php
@@ -20,6 +20,7 @@
 ?>
 <?php
 	$t_filter = current_user_get_bug_filter();
+	$t_filter = $t_filter === false ? array() : $t_filter;
 
 	$t_sort = $t_filter['sort'];
 	$t_dir = $t_filter['dir'];
@@ -157,6 +158,7 @@
 	$url_link_parameters['verify'] = 'reporter_id=' . $t_current_user_id . '&amp;show_status=' . $t_bug_resolved_status_threshold;
 
         $rows = filter_get_bug_rows ( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, $c_filter[$t_box_title]  );
+		$t_filter = array_merge( $c_filter[$t_box_title], $t_filter );
 
         $box_title = lang_get( 'my_view_title_' . $t_box_title );
 ?>

Relationships

related to 0008862 acknowledged View Issues highlights all sub-project issues as recent 

Activities

jreese

jreese

2007-10-09 16:13

reporter   ~0015837

The patch to My View has been submitted to CVS head as well as the 1.1.0 branch.

Should this issue be pursued further to determine a fix to the Current User API?

jreese

jreese

2007-11-20 10:30

reporter   ~0016253

No feedback, marking this as resolved.

Related Changesets

MantisBT: master 0ce6b039

2007-10-09 16:10

jreese


Details Diff
Fix 0008453: My View incorrectly handles user vs view filters for sub-projects.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4630 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0008453
mod - core/my_view_inc.php Diff File

MantisBT: master-1.1.x 7c06970b

2007-10-09 16:10

jreese


Details Diff
Fix 0008453: My View incorrectly handles user vs view filters for sub-projects.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/branches/BRANCH_1_1_0@4630 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0008453
mod - core/my_view_inc.php Diff File