[Rt-commit] rt branch, 4.2/serialize-objectscrips, repushed
Alex Vandiver
alexmv at bestpractical.com
Thu Nov 6 15:55:17 EST 2014
The branch 4.2/serialize-objectscrips was deleted and repushed:
was d9ad9c5dbfc86eb0f1de61dd989d652e8dee8e84
now fe3b6edf8057fde660f07c08811e603b815be320
1: d9ad9c5 ! 1: fe3b6ed Fix dependency analysis of Scrips, ObjectScrips, and Queues
@@ -12,6 +12,19 @@
Rework the dependency analysis of Scrips to mirror that of CustomFields,
in being many-to-many.
+
+diff --git a/lib/RT/Migrate/Serializer.pm b/lib/RT/Migrate/Serializer.pm
+--- a/lib/RT/Migrate/Serializer.pm
++++ b/lib/RT/Migrate/Serializer.pm
+@@
+ return $self->{FollowTickets};
+ } elsif ($obj->isa("RT::ACE")) {
+ return $self->{FollowACL};
+- } elsif ($obj->isa("RT::Scrip") or $obj->isa("RT::Template")) {
++ } elsif ($obj->isa("RT::Scrip") or $obj->isa("RT::Template") or $obj->isa("RT::ObjectScrip")) {
+ return $self->{FollowScrips};
+ } elsif ($obj->isa("RT::GroupMember")) {
+ my $grp = $obj->GroupObj->Object;
diff --git a/lib/RT/ObjectScrip.pm b/lib/RT/ObjectScrip.pm
--- a/lib/RT/ObjectScrip.pm
@@ -77,3 +90,24 @@
$deps->Add( out => $self->TemplateObj );
}
+-sub PreInflate {
+- my $class = shift;
+- my ($importer, $uid, $data) = @_;
+-
+- $class->SUPER::PreInflate( $importer, $uid, $data );
+-
+- if ($data->{Queue} == 0) {
+- my $obj = RT::Scrip->new( RT->SystemUser );
+- $obj->LoadByCols( Queue => 0, Description => $data->{Description} );
+- if ($obj->Id) {
+- $importer->Resolve( $uid => ref($obj) => $obj->Id );
+- return;
+- }
+- }
+-
+- return 1;
+-}
+-
+ RT::Base->_ImportOverlays();
+
+ 1;
More information about the rt-commit
mailing list