[Rt-commit] rt branch, 4.2/force-approvals-disabled, repushed

Alex Vandiver alexmv at bestpractical.com
Mon May 5 20:27:10 EDT 2014


The branch 4.2/force-approvals-disabled was deleted and repushed:
       was dbc587265e33b65cd2fc4b05f0d117503506d2e6
       now f32098fd23d4f8e3de439e83869ed9b2bd121c85

1:  f462eca ! 1:  4f3a234 Force Disabled and Lifecycle on the ___Approvals queue
    @@ -1,6 +1,6 @@
     Author: Kevin Falcone <falcone at bestpractical.com>
     
    -    Force the ___Approvals queue to have Disabled = 2
    +    Force Disabled and Lifecycle on the ___Approvals queue
         
         Because ___Approvals needs to be Disabled = 2 in order to be hidden but
         still have tickets created, we fixed the display of the Enabled?
    @@ -9,8 +9,13 @@
         create Approvals tickets without manually going and changing the value
         in the database.
         
    -    Force ___Approvals to have the Disabled value assigned on a new 4.2
    -    install.
    +    The same applies to the lifecycle; because we ceased listing the
    +    "approvals" lifecycle in b97a61b6, merely pressing "Save Changes" on the
    +    __Approvals queue would unfixably alter the lifecycle to "default"
    +    instead of "approvals".
    +    
    +    Force ___Approvals to have the Disabled and Lifecycle values assigned on
    +    a new 4.2 install.
     
     diff --git a/etc/upgrade/4.2.4/content b/etc/upgrade/4.2.4/content
     --- a/etc/upgrade/4.2.4/content
    @@ -36,6 +41,15 @@
     +        }
     +    }
     +
    ++    unless ($queue->Lifecycle eq "approvals") {
    ++        RT->Logger->warning("Going to force ___Approvals queue to the approvals lifecycle");
    ++        ($ok, $msg) = $queue->SetLifecycle( "approvals" );
    ++        unless ($ok) {
    ++            RT->Logger->error("Unable to set ___Approvals lifecycle: $msg");
    ++            return;
    ++        }
    ++    }
    ++
     +    return 1;
     +
     +};
2:  028bf59 < -:  ------- Document 4.2.4/content
-:  ------- > 2:  6392911 Document 4.2.4/content
3:  dbc5872 ! 3:  f32098f Reverse SetDisabled logic checking
    @@ -10,12 +10,12 @@
     --- a/lib/RT/Queue.pm
     +++ b/lib/RT/Queue.pm
     @@
    -     my $set_err = $self->_Set( Field =>'Disabled', Value => $val);
    -     unless ($set_err) {
    +     my ($ok, $msg) = $self->_Set( Field =>'Disabled', Value => $val);
    +     unless ($ok) {
              $RT::Handle->Rollback();
    --        $RT::Logger->warning("Couldn't ".($val == 1) ? "disable" : "enable"." queue ".$self->Name);
    -+        $RT::Logger->warning("Couldn't ".($val == 0) ? "enable" : "disable"." queue ".$self->Name);
    -         return (undef);
    +-        $RT::Logger->warning("Couldn't ".(($val == 1) ? "disable" : "enable")." queue ".$self->Name.": $msg");
    ++        $RT::Logger->warning("Couldn't ".(($val == 0) ? "enable" : "disable")." queue ".$self->Name.": $msg");
    +         return ($ok, $msg);
          }
     -    $self->_NewTransaction( Type => ($val == 1) ? "Disabled" : "Enabled" );
     +    $self->_NewTransaction( Type => ($val == 0) ? "Enabled" : "Disabled" );



More information about the rt-commit mailing list