View Issue Details

IDProjectCategoryView StatusLast Update
0009924mantisbtfilterspublic2014-11-23 01:24
Reportermthibeault Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Summary0009924: Unable to search by a range of ids or into a specific search emplacement.
Description

At the moment, it is difficult to search through a certain range of bug id. It is also impossible to specify where to search (ie, in notes, in custom fields, in description, or in all of the above).

Additional Information

Patch added. The patch is against GIT commit a09b9e7c3b9c0cce7ade7c6dba57c8a0d84af669. Sadly I won't be able to work on it anymore. At this time it has been used for several months with only problems when trying to keep up with the SVN/GIT filter file (which is a monster to work with... even more so when your boss didn't like the filters enough to keep them in order), but those were solved long ago.
The patch also normalize the last line of the filter display to make it look like the other filter lines.

Tagspatch

Activities

2008-12-01 14:36

 

search_id_emplacement.diff (21,994 bytes)   
diff -x config_inc.php -N -a --unified -r mantisbt/config_filter_defaults_inc.php mantisbt-diff/config_filter_defaults_inc.php
--- mantisbt/config_filter_defaults_inc.php	2008-11-30 14:16:41.000000000 -0500
+++ mantisbt-diff/config_filter_defaults_inc.php	2008-12-01 13:38:52.757531300 -0500
@@ -25,6 +25,8 @@
     ###########################################################################
 
     define( 'FILTER_PROPERTY_FREE_TEXT', 'search' );
+	define( 'FILTER_PROPERTY_SEARCH_EMPLACEMENT', 'search_emplacement' );
+	define( 'FILTER_PROPERTY_ISSUE_ID', 'issue_id' );
     define( 'FILTER_PROPERTY_CATEGORY', 'show_category' );
     define( 'FILTER_PROPERTY_SEVERITY_ID', 'show_severity' );
     define( 'FILTER_PROPERTY_STATUS_ID', 'show_status' );
@@ -69,6 +71,8 @@
     ###########################################################################
 
     define( 'FILTER_SEARCH_FREE_TEXT', 'search' );
+	define( 'FILTER_SEARCH_SEARCH_EMPLACEMENT', 'search_emplacement' );
+	define( 'FILTER_SEARCH_ISSUE_ID', 'issue_id' );
     define( 'FILTER_SEARCH_CATEGORY', 'category' );
     define( 'FILTER_SEARCH_SEVERITY_ID', 'severity_id');
     define( 'FILTER_SEARCH_STATUS_ID', 'status_id' );
diff -x config_inc.php -N -a --unified -r mantisbt/core/filter_api.php mantisbt-diff/core/filter_api.php
--- mantisbt/core/filter_api.php	2008-11-30 14:16:41.000000000 -0500
+++ mantisbt-diff/core/filter_api.php	2008-12-01 14:22:17.826220700 -0500
@@ -78,7 +78,12 @@
 	if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_FREE_TEXT] ) ) {
 		$t_query[] = filter_encode_field_and_value( FILTER_SEARCH_FREE_TEXT, $p_custom_filter[FILTER_PROPERTY_FREE_TEXT] );
 	}
-
+	if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_TEXT_EMPLACEMENT] ) ) {
+		$t_query[] = filter_encode_field_and_value( FILTER_SEARCH_TEXT_EMPLACEMENT, $p_custom_filter[FILTER_PROPERTY_TEXT_EMPLACEMENT] );
+	}
+	if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_ISSUE_ID] ) ) {
+		$t_query[] = filter_encode_field_and_value( FILTER_SEARCH_ISSUE_ID, $p_custom_filter[FILTER_PROPERTY_ISSUE_ID] );
+	}
 	if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_CATEGORY] ) ) {
 		$t_query[] = filter_encode_field_and_value( FILTER_SEARCH_CATEGORY, $p_custom_filter[FILTER_PROPERTY_CATEGORY] );
 	}
@@ -1800,36 +1805,112 @@
 			}
 		}
 	}
+	
+	# Search by Id
+	$t_valid_id_filter_characters = array('>', '<', ',', '-', '=', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' );
+	$t_id_filter = '';
+	for($i = 0; $i < strlen($t_filter['issue_id']); $i++) {
+		if( in_array( $t_filter['issue_id'][$i], $t_valid_id_filter_characters ) ) {
+			$t_id_filter .= $t_filter['issue_id'][$i];
+		}
+	}
+				
+	$t_filter['issue_id'] = $t_id_filter;
+
+	if( strlen( trim( $t_filter['issue_id'] ) ) > 0 ) {
+		$t_id_filters = explode( ',', $t_filter['issue_id'] );
+		for ( $i = 0; $i < count($t_id_filters); $i++ ) {
+			$idfilter = trim( $t_id_filters[$i] );
+			if( strlen( $idfilter ) == 0 )
+				continue;
+
+			$operator = null;
+			$numberStart = 1;
+		
+			if( $idfilter[0] == '>' ) {
+				if( $idfilter[1] == '=' ) {
+					$operator = '>=';
+					$numberStart = 2;
+				}
+				else {
+					$operator = '>';
+				}
+			} else if( $idfilter[0] == '<' ) {
+				if( $idfilter[1] == '=' ) {
+					$operator = '<=';
+					$numberStart = 2;
+				}
+				else {
+					$operator = '<';
+				}
+			} else {
+				$numberStart = 0;
+				$range = explode( '-', $idfilter );
+				if( count( $range ) == 1 ) {
+					$operator = '=';
+				} else {
+					$operator = 'BETWEEN ' . db_prepare_int( $range[0] ) . ' AND';
+					$idfilter = $range[1];
+				}
+			}			
+			$t_id_filters[$i] = "( $t_bug_table.id $operator " . substr($idfilter, $numberStart) . ")";
+		}
+		if( count( $t_id_filters ) > 0 ) {
+			array_push( $t_where_clauses, '(' . implode( ' OR ', $t_id_filters ) . ')' );
+		}
+	}
 
 	# Text search
-	if( !is_blank( $t_filter[FILTER_PROPERTY_FREE_TEXT] ) ) {
-		$c_search = '%' . $t_filter[FILTER_PROPERTY_FREE_TEXT] . '%';
-		$t_textsearch_where_clause = '(' . db_helper_like( 'summary' ) . ' OR ' . db_helper_like( "$t_bug_text_table.description" ) . ' OR ' . db_helper_like( "$t_bug_text_table.steps_to_reproduce" ) . ' OR ' . db_helper_like( "$t_bug_text_table.additional_information" ) . ' OR ' . db_helper_like( "$t_bugnote_text_table.note" );
-
-		$t_where_params[] = $c_search;
-		$t_where_params[] = $c_search;
-		$t_where_params[] = $c_search;
-		$t_where_params[] = $c_search;
-		$t_where_params[] = $c_search;
-
-		if( is_numeric( $t_filter[FILTER_PROPERTY_FREE_TEXT] ) ) {
-			$c_search_int = (int) $t_filter[FILTER_PROPERTY_FREE_TEXT];
-			$t_textsearch_where_clause .= " OR $t_bug_table.id = " . db_param();
-			$t_textsearch_where_clause .= " OR $t_bugnote_table.id = " . db_param();
-			$t_where_params[] = $c_search_int;
-			$t_where_params[] = $c_search_int;
-		}
-		$t_textsearch_where_clause .= " )";
-
-		# add text query elements to arrays
-		$t_from_clauses[] = "$t_bug_text_table";
-		$t_where_clauses[] = "$t_bug_table.bug_text_id = $t_bug_text_table.id";
-		$t_where_clauses[] = $t_textsearch_where_clause;
-		$t_join_clauses[] = " LEFT JOIN $t_bugnote_table ON $t_bug_table.id = $t_bugnote_table.bug_id";
-		$t_join_clauses[] = " LEFT JOIN $t_bugnote_text_table ON $t_bugnote_table.bugnote_text_id = $t_bugnote_text_table.id";
+	$t_search_emplacement_list = '';
+	if( isset( $t_filter['search_emplacement'] ) == 0 || is_blank($t_filter['search_emplacement']) ) {
+		$t_search_emplacement_list = 'Summary|Description|Additional|Steps|Notes|Custom';
+	} else {
+		$t_search_emplacement_list = $t_filter['search_emplacement'];
 	}
+	$t_search_emplacements = explode( '|', $t_search_emplacement_list );
+	
+	if ( !is_blank( $t_filter[ FILTER_PROPERTY_FREE_TEXT ] ) ) {
+		$c_search = '%' . $t_filter[ FILTER_PROPERTY_FREE_TEXT ] . '%';
+
+		$t_textsearch_where_clauses = array();
+
+		if( in_array('Summary', $t_search_emplacements) ) {
+			$t_textsearch_where_clauses[] = db_helper_like( 'summary' );
+		}
+
+		if( in_array('Description', $t_search_emplacements) ) {
+			$t_textsearch_where_clauses[] = db_helper_like( "$t_bug_text_table.description" );
+		}
+		if ( in_array('Steps', $t_search_emplacements) ) {
+			$t_textsearch_where_clauses[] = db_helper_like( "$t_bug_text_table.steps_to_reproduce" );
+		}
+		if ( in_array('Additional', $t_search_emplacements) ) {
+			$t_textsearch_where_clauses[] = db_helper_like( "$t_bug_text_table.additional_information" );
+		}
+		if ( in_array('Notes', $t_search_emplacements) ) {
+			$t_textsearch_where_clauses[] = db_helper_like( "$t_bugnote_text_table.note" );
+			$t_join_clauses[] = " LEFT JOIN $t_bugnote_table ON $t_bug_table.id = $t_bugnote_table.bug_id";
+			$t_join_clauses[]	= " LEFT JOIN $t_bugnote_text_table ON $t_bugnote_table.bugnote_text_id = $t_bugnote_text_table.id";
+		}
+		if ( in_array('Custom', $t_search_emplacements) ) {
+			$t_textsearch_where_clauses[] = db_helper_like( "$t_custom_field_string_table.value" );
+			$t_join_clauses[] = " LEFT JOIN $t_custom_field_string_table ON $t_custom_field_string_table.bug_id = $t_bug_table.id ";
+		}
+
+		if( $t_textsearch_where_clauses > 0 )
+		{
+			$t_textsearch_where_clause = '(' . implode( ' OR ', $t_textsearch_where_clauses ) . ')';
 
-	# End text search
+			# add text query elements to arrays
+			$t_from_clauses[] = "$t_bug_text_table";
+			$t_where_clauses[] = "$t_bug_table.bug_text_id = $t_bug_text_table.id";
+			for($j = 0; $j < count($t_textsearch_where_clauses); $j++) {
+				$t_where_params[] = $c_search;
+			}
+			$t_where_clauses[] = $t_textsearch_where_clause;
+
+		}
+	} # End text search
 
 	$t_from_clauses[] = $t_project_table;
 	$t_from_clauses[] = $t_bug_table;
@@ -2970,10 +3051,61 @@
 			}
 		}
 		?>
-		<tr class="row-1">
-			<td class="small-caption category2" valign="top">
+		<tr <?php PRINT "class=\"" . $t_trclass . "\"";?>>
+			<td class="small-caption" valign="top">
+				<a href="<?php PRINT $t_filters_url . FILTER_PROPERTY_SEARCH_EMPLACEMENT; ?>" id="show_search_emplacement_filter"><?php PRINT lang_get( 'search_emplacement' ) ?>:</a>
+			</td>
+			<td class="small-caption" valign="top">
                 <a href="<?php PRINT $t_filters_url . FILTER_PROPERTY_NOTE_USER_ID;?>" id="note_user_id_filter"><?php PRINT lang_get( 'note_user_id' )?>:</a>
             </td>
+			<td class="small-caption" valign="top" colspan="<?php echo ( $t_filter_cols - 4 ) ?>">
+				<a href="<?php PRINT $t_filters_url . 'show_sort';?>" id="show_sort_filter"><?php PRINT lang_get( 'sort' )?>:</a>
+			</td>
+			<td class="small-caption" valign="top" colspan="2">
+			<?php
+				if( 'advanced' == $t_view_type ) {
+			?>
+					<a href="<?php PRINT $t_filters_url . FILTER_PROPERTY_PROJECT_ID;?>" id="project_id_filter"><?php PRINT lang_get( 'email_project' )?>:</a>
+			<?php
+				}
+			?>
+			</td>
+		</tr>
+		<tr class="row-1">
+			<td class="small-caption" valign="top" id="show_search_emplacement_filter_target">
+				<?php
+					if( count( $t_filter[FILTER_PROPERTY_SEARCH_EMPLACEMENT] ) == 0 || is_blank( $t_filter[FILTER_PROPERTY_SEARCH_EMPLACEMENT] ) ) {
+						PRINT lang_get('search_emplacement_all');
+					} else {
+						$t_output = '';
+						$t_any_found = false;
+						if ( count( $t_filter[FILTER_PROPERTY_SEARCH_EMPLACEMENT] ) == 0 ) {
+							PRINT lang_get( 'search_emplacement_all' );
+						} else {
+							$t_first_flag = true;
+							$t_current = stripslashes( $t_filter[FILTER_PROPERTY_SEARCH_EMPLACEMENT] );
+							echo '<input type="hidden" name="', FILTER_PROPERTY_SEARCH_EMPLACEMENT, '" value="', string_display( $t_current ), '" />';
+							$t_this_string = '';
+
+							if ( is_blank( $t_current ) ) {
+								$t_any_found = true;
+							} else {
+								$t_this_string = string_display( $t_current );
+							}
+
+							$t_output .= $t_this_string;
+						}
+
+						if ( true == $t_any_found ) {
+							PRINT lang_get( 'any' );
+						} else {
+							$t_search_emplacements = get_search_emplacements();
+							PRINT lang_get( $t_search_emplacements[$t_output] );
+						}
+					}
+				?>
+			</td>
+
             <td class="small-caption" valign="top" id="note_user_id_filter_target">
                 <?php
                     $t_output = '';
@@ -3013,10 +3145,7 @@
 		}
 		?>
             </td>
-			<td class="small-caption" valign="top">
-				<a href="<?php PRINT $t_filters_url . 'show_sort';?>" id="show_sort_filter"><?php PRINT lang_get( 'sort' )?>:</a>
-			</td>
-			<td class="small-caption" valign="top" id="show_sort_filter_target">
+			<td class="small-caption" valign="top" id="show_sort_filter_target" colspan="<?php echo ( $t_filter_cols - 4 ) ?>">
 				<?php
 					$t_sort_fields = split( ',', $t_filter[FILTER_PROPERTY_SORT_FIELD_NAME] );
 		$t_dir_fields = split( ',', $t_filter[FILTER_PROPERTY_SORT_DIRECTION] );
@@ -3040,52 +3169,40 @@
 		}
 		?>
 			</td>
+			<td class="small-caption" valign="top"  id="project_id_filter_target" colspan="2">
 			<?php
 				if( 'advanced' == $t_view_type ) {
-			?>
-					<td class="small-caption" valign="top" colspan="2">
-						<a href="<?php PRINT $t_filters_url . FILTER_PROPERTY_PROJECT_ID;?>" id="project_id_filter"><?php PRINT lang_get( 'email_project' )?>:</a>
-					</td>
-					<td class="small-caption" valign="top"  id="project_id_filter_target">
-						<?php
-							$t_output = '';
-			if( !is_array( $t_filter[FILTER_PROPERTY_PROJECT_ID] ) ) {
-				$t_filter[FILTER_PROPERTY_PROJECT_ID] = Array(
-					$t_filter[FILTER_PROPERTY_PROJECT_ID],
-				);
-			}
-			if( count( $t_filter[FILTER_PROPERTY_PROJECT_ID] ) == 0 ) {
-				PRINT lang_get( 'current' );
-			} else {
-				$t_first_flag = true;
-				foreach( $t_filter[FILTER_PROPERTY_PROJECT_ID] as $t_current ) {
-					echo '<input type="hidden" name="', FILTER_PROPERTY_PROJECT_ID, '[]" value="', $t_current, '" />';
-					$t_this_name = '';
-					if( META_FILTER_CURRENT == $t_current ) {
-						$t_this_name = lang_get( 'current' );
-					} else {
-						$t_this_name = project_get_name( $t_current );
-					}
-					if( $t_first_flag != true ) {
-						$t_output = $t_output . '<br />';
-					} else {
-						$t_first_flag = false;
+					$t_output = '';
+					if( !is_array( $t_filter[FILTER_PROPERTY_PROJECT_ID] ) ) {
+						$t_filter[FILTER_PROPERTY_PROJECT_ID] = Array(
+						$t_filter[FILTER_PROPERTY_PROJECT_ID],
+					);
+				}
+				if( count( $t_filter[FILTER_PROPERTY_PROJECT_ID] ) == 0 ) {
+					PRINT lang_get( 'current' );
+				} else {
+					$t_first_flag = true;
+					foreach( $t_filter[FILTER_PROPERTY_PROJECT_ID] as $t_current ) {
+						echo '<input type="hidden" name="', FILTER_PROPERTY_PROJECT_ID, '[]" value="', $t_current, '" />';
+						$t_this_name = '';
+						if( META_FILTER_CURRENT == $t_current ) {
+							$t_this_name = lang_get( 'current' );
+						} else {
+							$t_this_name = project_get_name( $t_current );
+						}
+						if( $t_first_flag != true ) {
+							$t_output = $t_output . '<br />';
+						} else {
+							$t_first_flag = false;
+						}
+						$t_output = $t_output . $t_this_name;
 					}
-					$t_output = $t_output . $t_this_name;
+					PRINT $t_output;
 				}
-				PRINT $t_output;
-			}
 			?>
-					</td>
-					<?php
-					if( $t_filter_cols > 6 ) {
-				echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 5 ) . '">&nbsp;</td>';
-			}
-		} else {
-			if( $t_filter_cols > 3 ) {
-				echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 2 ) . '">&nbsp;</td>';
+			</td>
+		<?php
 			}
-		}
 		?>
 		</tr>
 		<?php
@@ -3094,11 +3211,15 @@
 	// expanded
 	?>
 		<tr>
-			<td colspan="2">
+			<td class="left" colspan="2">
 				<?php
 					collapse_icon( 'filter' );
+					echo '<span title="', lang_get( 'id_selection_tooltip_help' ), '">';
+					echo lang_get( 'id_selection' );
+					echo '<input type="text" size="10" name="', FILTER_PROPERTY_ISSUE_ID, '" value="', string_html_specialchars( $t_filter[FILTER_PROPERTY_ISSUE_ID] ), '" />';
+					echo '</span>';
 	echo lang_get( 'search' ) . '&nbsp;';
-	echo '<input type="text" size="16" name="', FILTER_PROPERTY_FREE_TEXT, '" value="', string_html_specialchars( $t_filter[FILTER_PROPERTY_FREE_TEXT] ), '" />';
+	echo '<input type="text" size="10" name="', FILTER_PROPERTY_FREE_TEXT, '" style="width=2" value="', string_html_specialchars( $t_filter[FILTER_PROPERTY_FREE_TEXT] ), '" />';
 	?>
 
 				<input type="submit" name="filter" class="button-small" value="<?php PRINT lang_get( 'filter_button' )?>" />
@@ -3731,6 +3852,52 @@
 			echo '</select>';
 		}
 	}
+
+}
+
+/**
+ * print search emplacement fields
+ */
+function print_filter_show_search_emplacement() {
+	global $t_filter;	
+	
+	echo '<select name="search_emplacement">';
+	$t_first = true;
+	foreach( get_search_emplacements() as $key => $emplacement )
+	{
+		filter_print_search_emplacement( $key, lang_get($emplacement), $t_filter['search_emplacement'], $t_first );
+		$t_first = false;
+	}
+	echo '</select>';
+}
+
+function filter_print_search_emplacement( $option_value, $name, $search_value = '', $default = false ) {
+	$t_selected = $option_value == $search_value;
+	echo '<option value="' . $option_value;
+	if( $t_selected || (is_blank($search_value) && $default))
+		echo '" selected="true';
+	echo '">' . $name . '</option>';
+}
+
+function get_search_emplacements()
+{
+	global $g_search_emplacement_values;
+
+	if( !$g_search_emplacement_values ) {
+		$g_search_emplacement_values = array(
+			'Summary|Description|Additional|Steps|Notes|Custom' => 'search_emplacement_all',
+			'Summary|Description|Additional|Steps|Notes' => 'search_emplacement_all_no_customfields',
+			'Summary|Description|Additional|Steps' => 'search_emplacement_issue',
+			'Summary' => 'search_emplacement_summary',
+			'Description' => 'search_emplacement_description',
+			'Additional' => 'search_emplacement_additional_information',
+			'Steps' => 'search_emplacement_steps_to_reproduce',
+			'Notes' => 'search_emplacement_notes',
+			'Custom' => 'search_emplacement_custom_field'
+		);
+	}
+	
+	return $g_search_emplacement_values;
 }
 
 /**
diff -x config_inc.php -N -a --unified -r mantisbt/lang/strings_english.txt mantisbt-diff/lang/strings_english.txt
--- mantisbt/lang/strings_english.txt	2008-11-30 14:16:41.000000000 -0500
+++ mantisbt-diff/lang/strings_english.txt	2008-12-01 14:07:34.283365700 -0500
@@ -1558,4 +1558,20 @@
 $s_view_account_title = 'User Information';
 
 # view_user_page.php
-$s_manage_user = 'Manage User';
\ No newline at end of file
+$s_manage_user = 'Manage User';
+
+# Search Issue Id
+$s_id_selection = 'Id';
+$s_id_selection_tooltip_help = 'Valid operator:&#10;&#13;&#09;&quot;&lt;&quot; for all bugs less than specified number&#10;&#13;&#09;&quot;&gt;&quot; for all bugs greater than specified number&#10;&#13;&#09;&quot;,&quot; to separate multiple id&#10;&#13;&#09;&quot;-&quot; to get a range of bug id&#10;&#13;An example: <10,14-15,17,18,&gt;=200';
+
+# Search Emplacement
+$s_search_emplacement = 'Search Location';
+$s_search_emplacement_all = 'All (with custom fields)';
+$s_search_emplacement_all_no_customfields = 'All';
+$s_search_emplacement_issue = 'Issue (no Notes)';
+$s_search_emplacement_summary = 'Summary';
+$s_search_emplacement_description = 'Description';
+$s_search_emplacement_additional_information = 'Additional Information';
+$s_search_emplacement_steps_to_reproduce = 'Steps to Reproduce';
+$s_search_emplacement_notes = 'Notes';
+$s_search_emplacement_custom_field = 'Custom Fields';
diff -x config_inc.php -N -a --unified -r mantisbt/search.php mantisbt-diff/search.php
--- mantisbt/search.php	2008-11-30 14:16:41.000000000 -0500
+++ mantisbt-diff/search.php	2008-12-01 13:39:56.347618300 -0500
@@ -55,6 +55,8 @@
 
 	$my_filter = filter_get_default();
 	$my_filter[FILTER_PROPERTY_FREE_TEXT] = gpc_get_string( FILTER_SEARCH_FREE_TEXT, '' );
+	$my_filter[FILTER_PROPERTY_SEARCH_EMPLACEMENT] = gpc_get_string( FILTER_SEARCH_SEARCH_EMPLACEMENT, '' );
+	$my_filter[FILTER_PROPERTY_ISSUE_ID] = gpc_get_string( FILTER_SEARCH_ISSUE_ID, '' );
 	$my_filter[FILTER_PROPERTY_CATEGORY] = gpc_get_string_array( FILTER_SEARCH_CATEGORY, META_FILTER_ANY );
 	$my_filter[FILTER_PROPERTY_REPORTER_ID] = gpc_get_string_array( FILTER_SEARCH_REPORTER_ID, META_FILTER_ANY );
 	$my_filter[FILTER_PROPERTY_HANDLER_ID] = gpc_get_string_array( FILTER_SEARCH_HANDLER_ID, META_FILTER_ANY );
diff -x config_inc.php -N -a --unified -r mantisbt/view_all_set.php mantisbt-diff/view_all_set.php
--- mantisbt/view_all_set.php	2008-11-30 14:16:41.000000000 -0500
+++ mantisbt-diff/view_all_set.php	2008-12-01 13:40:29.845688700 -0500
@@ -226,6 +226,9 @@
 	$f_do_filter_by_date	= gpc_get_bool( FILTER_PROPERTY_FILTER_BY_DATE );
 	$f_view_state			= gpc_get_int( FILTER_PROPERTY_VIEW_STATE_ID, META_FILTER_ANY );
 
+	$f_search_emplacement	= gpc_get_string( 'search_emplacement', '' );
+	$f_issue_id				= gpc_get_string( 'issue_id', '' );
+
 	$f_tag_string			= gpc_get_string( FILTER_PROPERTY_TAG_STRING, '' );
 	$f_tag_select			= gpc_get_int( FILTER_PROPERTY_TAG_SELECT, '0' );
 
@@ -421,6 +424,8 @@
 				$t_setting_arr[ FILTER_PROPERTY_END_DAY ] 				= $f_end_day;
 				$t_setting_arr[ FILTER_PROPERTY_END_YEAR ] 				= $f_end_year;
 				$t_setting_arr[ FILTER_PROPERTY_FREE_TEXT ] 			= $f_search;
+				$t_setting_arr[ FILTER_PROPERTY_SEARCH_EMPLACEMENT ] = $f_search_emplacement;
+				$t_setting_arr[ FILTER_PROPERTY_ISSUE_ID ] = $f_issue_id;
 				$t_setting_arr[ FILTER_PROPERTY_HIDE_STATUS_ID ] 		= $f_hide_status;
 				$t_setting_arr[ FILTER_PROPERTY_NOT_ASSIGNED ] 			= $f_and_not_assigned;
 				$t_setting_arr[ FILTER_PROPERTY_RESOLUTION_ID ] 		= $f_show_resolution;
@@ -487,6 +492,7 @@
 				$t_setting_arr[ FILTER_PROPERTY_NOTE_USER_ID ]  	= array( META_FILTER_ANY );
 				$t_setting_arr[ FILTER_PROPERTY_RELATIONSHIP_TYPE ] = -1;
 				$t_setting_arr[ FILTER_PROPERTY_RELATIONSHIP_BUG ] 	= 0;
+				$t_setting_arr[ FILTER_PROPERTY_ISSUE_ID ] = '';
 
 				$t_custom_fields 		= custom_field_get_ids(); # @@@ (thraxisp) This should really be the linked ids, but we don't know the project
 				$t_custom_fields_data 	= array();
diff -x config_inc.php -N -a --unified -r mantisbt/view_filters_page.php mantisbt-diff/view_filters_page.php
--- mantisbt/view_filters_page.php	2008-11-30 14:16:41.000000000 -0500
+++ mantisbt-diff/view_filters_page.php	2008-12-01 13:41:14.015019400 -0500
@@ -417,10 +417,18 @@
 ?>
 
 <tr class="row-1">
+	<td class="small-caption" colspan="1" valign="top">
+		<?php PRINT 'Search emplacement' ?>
+	</td>
+	<td valign="top" colspan="1">
+		<?php
+			print_filter_show_search_emplacement();
+		?>
+	</td>
 	<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>" valign="top">
 		<?php PRINT lang_get( 'sort' ) ?>:
 	</td>
-	<td valign="top" colspan="<?php echo ( ( $t_filter_cols - 1 - $t_project_cols ) * $t_custom_cols ); ?>">
+	<td valign="top" colspan="<?php echo ( ( $t_filter_cols - 3 - $t_project_cols ) * $t_custom_cols ); ?>">
 		<?php
 			print_filter_show_sort();
 		?>
@@ -441,13 +449,19 @@
 	?>
 </tr>
 <tr class="row-category2">
-<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'search' ) ?></td>
+<td class="small-caption" colspan="1"><?php echo lang_get( 'id_selection' ) ?></td>
+<td class="small-caption" colspan="2"><?php echo lang_get( 'search' ) ?></td>
 <td class="small-caption" colspan="<?php echo ( ( $t_filter_cols - 2 ) * $t_custom_cols ); ?>"><?php if ( $t_show_tags ) { echo lang_get( 'tags' ); } ?></td>
 <td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"></td>
 </tr>
 <tr>
+	<!-- Search by Id field -->
+	<td colspan="1">
+		<input type="text" size="16" name="issue_id" value="<?php PRINT string_html_specialchars( $t_filter[FILTER_PROPERTY_ISSUE_ID] ); ?>" />
+	</td>
+
 	<!-- Search field -->
-	<td colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
+	<td colspan="2">
 		<input type="text" size="16" name="search" value="<?php echo string_html_specialchars( $t_filter['search'] ); ?>" />
 	</td>
 
search_id_emplacement.diff (21,994 bytes)   

Issue History

Date Modified Username Field Change
2008-12-01 14:36 mthibeault New Issue
2008-12-01 14:36 mthibeault File Added: search_id_emplacement.diff
2008-12-01 15:23 grangeway Status new => assigned
2008-12-01 15:23 grangeway Assigned To => grangeway
2014-11-07 16:38 atrol Assigned To grangeway =>
2014-11-07 16:38 atrol Severity major => feature
2014-11-07 16:38 atrol Status assigned => new
2014-11-23 01:24 vboctor Tag Attached: patch