View Issue Details

IDProjectCategoryView StatusLast Update
0009485mantisbtfilterspublic2014-01-25 09:46
Reporterpolzin Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version1.1.2 
Summary0009485: Filtering in all projects with permalink and hierachical projects does not work as expected
Description

To reproduce:

  • installation with a nested project hierarchy
  • Default: Advanced Filters
  • project "All projects" -> View Issues -> Create Permalink -> Click on Permalink
    Expected:
  • All issues again
    Seen:
  • Only issues in "head"-projects, not in sub-sub-projects.

Cause in filter_api.php:

  • Setting a project leads to "$t_include_sub_projects = false" (l479)
  • Even after discovering $t_pid == ALL_PROJECTS (l494), $t_include_sub_projects is false
  • user_get_accessible_projects gives only the top projects (l515).

The same problem should occur, if one permalinks to a project with sub-sub-projects.

My patch:
Always set $t_include_sub_projects

Reasoning:

  • Filtering with project_id seems only available through Permalinks.
  • When creating a Permalink, only the top project is put in the link.

Alternative:

  • Put a project and all its subprojects in the permalink
  • Drawback: Blows up the link.
Tagspatch
Attached Files
filter.patch (776 bytes)   
Index: core/filter_api.php
===================================================================
RCS file: /cvs/mantis/core/filter_api.php,v
retrieving revision 1.16
diff -u -r1.16 filter_api.php
--- core/filter_api.php	4 Aug 2008 22:11:52 -0000	1.16
+++ core/filter_api.php	4 Aug 2008 22:51:46 -0000
@@ -476,7 +476,9 @@
 				$t_project_ids = array_map( 'db_prepare_int', $t_filter['project_id'] );
 			}
 
-			$t_include_sub_projects = ( ( count( $t_project_ids ) == 1 ) && ( $t_project_ids[0] == META_FILTER_CURRENT ) );
+			#$t_include_sub_projects = ( ( count( $t_project_ids ) == 1 ) && ( $t_project_ids[0] == META_FILTER_CURRENT ) );
+			$t_include_sub_projects = true;
+
 		}
 
 		log_event( LOG_FILTERING, 'FILTERING: project_ids = ' . implode( ',', $t_project_ids ) );
filter.patch (776 bytes)   

Relationships

has duplicate 0008117 closed Wrong data in "Create Permlink" 

Activities

daryn

daryn

2008-08-05 21:00

reporter   ~0019043

Rewriting filter api. Will consider this.

papaya

papaya

2010-08-16 12:57

reporter   ~0026333

It look like as if this relates to the problem described in Bug 0009410 and Bug 0010984 - which both describe a problem we see in our installation of Mantis as well.

Is anyone currently working on that? Can we help by providing another detailled description of the issue or by being available for questions regarding this topic (how to reproduce etc.)?

atrol

atrol

2014-01-25 09:46

developer   ~0039184

Unassigned after having been assigned for a long time without progress.

atrol

atrol

2014-01-25 09:46

developer   ~0039185

Unassigned after having been assigned for a long time without progress.