View Issue Details

IDProjectCategoryView StatusLast Update
0006175mantisbtbugtrackerpublic2019-04-07 13:31
ReporterJohannes Martin Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status confirmedResolutionopen 
Product Version1.0.0rc1 
Summary0006175: Allow un-assign in bulk (through bug_actiongroup_page.php)
Description

One should be able to un-assign all selected issues using the bulk 'assign to' function. Currently, that function only lists real users that can receive the assignment.

It wouldn't hurt to include the 'myself' and 'reporter' options as well, i.e. just move all this partly duplicated code into print_assign_to_option_list().

Tagspatch
Attached Files
0001-Issue-6175-Allow-un-assign-in-bulk-through-bug_actio.patch (1,762 bytes)   
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

Relationships

has duplicate 0006865 closedatrol No 'empty' option using multi-assign from "view issues" page 
has duplicate 0007896 closedatrol Bulk assign does not allow issues to be unassigned 

Activities

zak.ford

zak.ford

2011-02-11 11:46

reporter   ~0028208

Uploaded patch fixes defect of un-assigning users in bulk

zak.ford

zak.ford

2011-02-11 11:55

reporter   ~0028209

I believe this is a duplicate of 0007896

atrol

atrol

2013-04-27 18:35

developer   ~0036706

Removed assignment. dhx will not contribute to this issue in near future.

ObSkewer

ObSkewer

2018-02-21 09:31

reporter   ~0058989

+1 for this suggestion being implemented officially.

Patch as given above needs to be updated for Mantis 2.10. Have attached a working patch.

0001-Mantis-Allow-bulk-assign-to-an-empty-developer.patch (1,845 bytes)   
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