[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-245-g8e26769
? sunnavy
sunnavy at bestpractical.com
Tue Aug 10 04:40:30 EDT 2010
The branch, 3.9-trunk has been updated
via 8e26769f7aa04fdad9ab84d27e08a8baef2ab7db (commit)
from cb10fbf7dfc14682e05bda55fd3e6509707840bc (commit)
Summary of changes:
lib/RT/Ticket_Overlay.pm | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 8e26769f7aa04fdad9ab84d27e08a8baef2ab7db
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Aug 10 16:41:56 2010 +0800
extract the transaction work in MergeInto into _MergeInto
diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index dc63d35..a9efc46 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -2516,6 +2516,18 @@ sub MergeInto {
$RT::Handle->BeginTransaction();
+ $self->_MergeInto( $MergeInto );
+
+ $RT::Handle->Commit();
+
+ return ( 1, $self->loc("Merge Successful") );
+}
+
+sub _MergeInto {
+ my $self = shift;
+ my $MergeInto = shift;
+
+
# We use EffectiveId here even though it duplicates information from
# the links table becasue of the massive performance hit we'd take
# by trying to do a separate database query for merge info everytime
@@ -2649,9 +2661,6 @@ sub MergeInto {
$self->AddLink( Type => 'MergedInto', Target => $MergeInto->Id());
$MergeInto->_SetLastUpdated;
-
- $RT::Handle->Commit();
- return ( 1, $self->loc("Merge Successful") );
}
=head2 Merged
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list