From d71fbd84ad5bfb2ce5ca02cad6513e5048d96799 Mon Sep 17 00:00:00 2001
From: Zak Ford <zak.ford@kitware.com>
Date: Fri, 11 Feb 2011 11:31:58 -0500
Subject: [PATCH] Issue #6175: Allow un-assign in bulk (through bug_actiongroup_page.php)

Added option field for blank user and updated form validation
---
 bug_actiongroup.php      |    3 ++-
 bug_actiongroup_page.php |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/bug_actiongroup.php b/bug_actiongroup.php
index 7d72793..48e3a47 100644
--- a/bug_actiongroup.php
+++ b/bug_actiongroup.php
@@ -128,7 +128,8 @@
 			# check that new handler has rights to handle the issue, and
 			#  that current user has rights to assign the issue
 			$t_threshold = access_get_status_threshold( $t_assign_status, bug_get_field( $t_bug_id, 'project_id' ) );
-			if ( access_has_bug_level( $t_threshold , $t_bug_id, $f_assign ) &&
+			if ( $f_assign == 0 || # Allow assigning to nobody
+				 access_has_bug_level( $t_threshold , $t_bug_id, $f_assign ) &&
 				 access_has_bug_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ), $t_bug_id ) &&
 					bug_check_workflow($t_status, $t_assign_status )	) {
 				/** @todo we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) ); */
diff --git a/bug_actiongroup_page.php b/bug_actiongroup_page.php
index 5de99c5..0083db3 100644
--- a/bug_actiongroup_page.php
+++ b/bug_actiongroup_page.php
@@ -244,6 +244,7 @@ if ( !$t_finished ) {
 					print_project_option_list( null, false );
 					break;
 				case 'ASSIGN':
+					echo '<option value="0"></option>';
 					print_assign_to_option_list( 0, $t_project_id );
 					break;
 				case 'RESOLVE':
-- 
1.7.2.3

