From fce76a09b5830b620595414ca8263e759de9813d Mon Sep 17 00:00:00 2001
From: dan <dan@yoyogames.com>
Date: Wed, 21 Feb 2018 14:26:29 +0000
Subject: [PATCH] [Mantis] Allow bulk-assign to an empty developer.

---
 Mantis/bug_actiongroup.php      | 2 +-
 Mantis/bug_actiongroup_page.php | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Mantis/bug_actiongroup.php b/Mantis/bug_actiongroup.php
index a57d820..8bffc1c 100644
--- a/Mantis/bug_actiongroup.php
+++ b/Mantis/bug_actiongroup.php
@@ -155,7 +155,7 @@ foreach( $f_bug_arr as $t_bug_id ) {
 			#  that current user has rights to assign the issue
 			$t_threshold = access_get_status_threshold( $t_assign_status, $t_bug->project_id );
 			if( access_has_bug_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ), $t_bug_id ) ) {
-				if( access_has_bug_level( config_get( 'handle_bug_threshold' ), $t_bug_id, $f_assign ) ) {
+				if( $f_assign == 0 || access_has_bug_level( config_get( 'handle_bug_threshold' ), $t_bug_id, $f_assign ) ) {
 					if( 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 ) );
 						bug_assign( $t_bug_id, $f_assign, $f_bug_notetext, $f_bug_noteprivate );
diff --git a/Mantis/bug_actiongroup_page.php b/Mantis/bug_actiongroup_page.php
index 4655668..10dcea5 100644
--- a/Mantis/bug_actiongroup_page.php
+++ b/Mantis/bug_actiongroup_page.php
@@ -312,6 +312,7 @@ if( $t_multiple_projects ) {
 							null /* $p_filter_project_id */, false /* $p_trace */, true /* $p_can_report_only */ );
 					break;
 				case 'ASSIGN':
+					echo '<option value="0"></option>';
 					print_assign_to_option_list( 0, $t_project_id );
 					break;
 				case 'RESOLVE':
-- 
2.12.0.windows.1

