[Rt-commit] rt branch, 4.2/serialize-objectscrips, updated. rt-4.2.6-39-g5412f59
Alex Vandiver
alexmv at bestpractical.com
Fri Nov 14 21:24:51 EST 2014
The branch, 4.2/serialize-objectscrips has been updated
via 5412f59a6cf4138b6b3a26665eade7d7923ff9a1 (commit)
from fe3b6edf8057fde660f07c08811e603b815be320 (commit)
Summary of changes:
lib/RT/Scrip.pm | 11 +++++++++++
1 file changed, 11 insertions(+)
- Log -----------------------------------------------------------------
commit 5412f59a6cf4138b6b3a26665eade7d7923ff9a1
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Nov 14 18:23:15 2014 -0800
Serialize Template as a string, not a uid
Despite the existance of a ->TemplateObj method on Scrips, the Template
column now stores the template by name, not by id. RT::Record, however,
see the ->TemplateObj method and assumes it needs to be stored by UID in
the serialized form; unfor this, and store the name.
diff --git a/lib/RT/Scrip.pm b/lib/RT/Scrip.pm
index 144f13c..bc57376 100644
--- a/lib/RT/Scrip.pm
+++ b/lib/RT/Scrip.pm
@@ -1120,6 +1120,17 @@ sub FindDependencies {
$deps->Add( out => $self->TemplateObj );
}
+sub Serialize {
+ my $self = shift;
+ my %args = (@_);
+ my %store = $self->SUPER::Serialize(@_);
+
+ # Store the string, not a reference to the object
+ $store{Template} = $self->Template;
+
+ return %store;
+}
+
RT::Base->_ImportOverlays();
1;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list