[Rt-commit] r7341 - in rt/branches/3.6-RELEASE: .
jesse at bestpractical.com
jesse at bestpractical.com
Mon Mar 26 03:26:11 EDT 2007
Author: jesse
Date: Mon Mar 26 03:26:10 2007
New Revision: 7341
Modified:
rt/branches/3.6-RELEASE/ (props changed)
rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm
Log:
r54212 at pinglin: jesse | 2007-03-26 00:24:20 -0700
* Allow merging resolved tickets
Modified: rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm Mon Mar 26 03:26:10 2007
@@ -2780,14 +2780,23 @@
return ( 0, $self->loc("Merge failed. Couldn't set EffectiveId") );
}
- my ( $status_val, $status_msg ) = $self->__Set( Field => 'Status', Value => 'resolved');
- unless ($status_val) {
- $RT::Handle->Rollback();
- $RT::Logger->error( $self->loc("[_1] couldn't set status to resolved. RT's Database may be inconsistent.", $self) );
- return ( 0, $self->loc("Merge failed. Couldn't set Status") );
- }
+ if ( $self->__Value('Status') ne 'resolved' ) {
+ my ( $status_val, $status_msg )
+ = $self->__Set( Field => 'Status', Value => 'resolved' );
+
+ unless ($status_val) {
+ $RT::Handle->Rollback();
+ $RT::Logger->error(
+ $self->loc(
+ "[_1] couldn't set status to resolved. RT's Database may be inconsistent.",
+ $self
+ )
+ );
+ return ( 0, $self->loc("Merge failed. Couldn't set Status") );
+ }
+ }
# update all the links that point to that old ticket
my $old_links_to = RT::Links->new($self->CurrentUser);
More information about the Rt-commit
mailing list