summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Transaction_Overlay.pm
diff options
context:
space:
mode:
authormark <mark>2011-02-17 03:47:50 +0000
committermark <mark>2011-02-17 03:47:50 +0000
commit90edd8a914fd484e649fb0aa051dce7927bd6881 (patch)
tree24e53dc621cd3825d00a78ad51908cab0906cf3c /rt/lib/RT/Transaction_Overlay.pm
parent01352af8e44b7eb70b2b587ca43ab7ca946f038d (diff)
TimeWorked-like custom fields, RT#11168
Diffstat (limited to 'rt/lib/RT/Transaction_Overlay.pm')
-rw-r--r--rt/lib/RT/Transaction_Overlay.pm37
1 files changed, 21 insertions, 16 deletions
diff --git a/rt/lib/RT/Transaction_Overlay.pm b/rt/lib/RT/Transaction_Overlay.pm
index c9e13dd77..d4b1ab2bc 100644
--- a/rt/lib/RT/Transaction_Overlay.pm
+++ b/rt/lib/RT/Transaction_Overlay.pm
@@ -110,12 +110,13 @@ sub Create {
NewValue => undef,
MIMEObj => undef,
ActivateScrips => 1,
- CommitScrips => 1,
- ObjectType => 'RT::Ticket',
- ObjectId => 0,
- ReferenceType => undef,
- OldReference => undef,
- NewReference => undef,
+ CommitScrips => 1,
+ ObjectType => 'RT::Ticket',
+ ObjectId => 0,
+ ReferenceType => undef,
+ OldReference => undef,
+ NewReference => undef,
+ CustomFields => {},
@_
);
@@ -130,17 +131,17 @@ sub Create {
#lets create our transaction
my %params = (
- Type => $args{'Type'},
- Data => $args{'Data'},
- Field => $args{'Field'},
- OldValue => $args{'OldValue'},
- NewValue => $args{'NewValue'},
- Created => $args{'Created'},
- ObjectType => $args{'ObjectType'},
- ObjectId => $args{'ObjectId'},
+ Type => $args{'Type'},
+ Data => $args{'Data'},
+ Field => $args{'Field'},
+ OldValue => $args{'OldValue'},
+ NewValue => $args{'NewValue'},
+ Created => $args{'Created'},
+ ObjectType => $args{'ObjectType'},
+ ObjectId => $args{'ObjectId'},
ReferenceType => $args{'ReferenceType'},
- OldReference => $args{'OldReference'},
- NewReference => $args{'NewReference'},
+ OldReference => $args{'OldReference'},
+ NewReference => $args{'NewReference'},
);
# Parameters passed in during an import that we probably don't want to touch, otherwise
@@ -158,6 +159,10 @@ sub Create {
}
}
+ # Set up any custom fields passed at creation. Has to happen
+ # before scrips.
+
+ $self->UpdateCustomFields(%{ $args{'CustomFields'} });
#Provide a way to turn off scrips if we need to
$RT::Logger->debug('About to think about scrips for transaction #' .$self->Id);