[Rt-commit] rt branch, 4.2/lifecycle-same-status-error, created. rt-4.2.3-67-g40593e9

Jim Brandt jbrandt at bestpractical.com
Tue Apr 1 16:35:08 EDT 2014


The branch, 4.2/lifecycle-same-status-error has been created
        at  40593e93f9ca936fd77d959c6a36f8dababf8e72 (commit)

- Log -----------------------------------------------------------------
commit 40593e93f9ca936fd77d959c6a36f8dababf8e72
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Apr 1 16:30:36 2014 -0400

    Avoid error on queue change when queues have equal statuses
    
    Currently if you have a mapping between two queues such that
    a status is the same for two queues, RT issues an error because
    the status is the same:
    
    [error]: Status change to confirmed failed on Queue change:
    That is already the current value
    
    Don't try to update the status if the new value retrieved from
    the map is the same as the current value.

diff --git a/lib/RT/Record/Role/Status.pm b/lib/RT/Record/Role/Status.pm
index dcea127..51d9435 100644
--- a/lib/RT/Record/Role/Status.pm
+++ b/lib/RT/Record/Role/Status.pm
@@ -284,7 +284,7 @@ sub _SetLifecycleColumn {
 
     my ($ok, $msg) = $self->_Set( Field => $column, Value => $new->id );
     if ($ok) {
-        if ( $new_status ) {
+        if ( $new_status and $new_status ne $self->Status ) {
             my $as_system = blessed($self)->new( RT->SystemUser );
             $as_system->Load( $self->Id );
             unless ( $as_system->Id ) {

-----------------------------------------------------------------------


More information about the rt-commit mailing list