View Issue Details

IDProjectCategoryView StatusLast Update
0005266mantisbtcustomizationpublic2015-09-03 18:14
Reportertandler Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version0.19.2 
Summary0005266: unassig issue when changing it from "assigned" to "new"
Description

I changed our workflow to be able to change an issue status from "assigned" to "new". Is it possible that when doing this, mantis automatically unassigns the assigned user? I didn't find any hints in the manual. Thanks!
(If it's not possible, I'd propose this as a new feature ... :-)

TagsNo tags attached.
Attached Files

Relationships

related to 0006729 new Status of ASSIGNED may exist w/o an assignee 

Activities

cproensa

cproensa

2015-09-03 18:14

developer   ~0051371

i attach a php code for a plugin that does what you want

when a bug status is changed into new, it removes the handler id
as you can see, two lines of code makes the simple plugin

BugStatusNewUnassign.php (1,290 bytes)   
<?php
class BugStatusNewUnassignPlugin extends MantisPlugin {

        function register() {
                $this->name = 'BugStatusNewUnassign';    # Proper name of plugin
                $this->description = 'BugStatusNewUnassign';    # Short description of the plugin
                $this->page = '';           # Default plugin page
                
                $this->version = '1.0';     # Plugin version string
                $this->requires = array(    # Plugin dependencies, array of basename => version pairs
                    #'MantisCore' => '1.3.0',  #   Should always depend on an appropriate version of MantisBT
                    );
                
                $this->author = 'carlos proensa';         # Author/team name
                $this->contact = '';        # Author/team e-mail address
                $this->url = '';            # Support webpage
        }


        function hooks() {
                return array(
                'EVENT_UPDATE_BUG_DATA' => 'updateBugData'
                );
        }

        function updateBugData ( $p_event, $p_new_data, $p_old_data) {

            if  ($p_new_data->status== NEW_ ) {
                    $p_new_data->handler_id = NO_USER;
                    }
            return $p_new_data;
        }

}
?>
BugStatusNewUnassign.php (1,290 bytes)