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.

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)   

Issue History

Date Modified Username Field Change
2005-02-21 03:47 tandler New Issue
2014-10-05 15:27 grangeway Category bugtracker => customization
2015-08-27 04:28 dregad Relationship added related to 0006729
2015-09-03 18:14 cproensa File Added: BugStatusNewUnassign.php
2015-09-03 18:14 cproensa Note Added: 0051371