X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fetc%2Fupgrade%2F4.0.19%2Fcontent;fp=rt%2Fetc%2Fupgrade%2F4.0.19%2Fcontent;h=31e4d9fb65955b0442766345e303c6ef86047702;hb=e131b1f71f08b69abb832c1687d1f29682d171f8;hp=0000000000000000000000000000000000000000;hpb=d05d7346bb2387fd9d0354923d577275c5c7f019;p=freeside.git diff --git a/rt/etc/upgrade/4.0.19/content b/rt/etc/upgrade/4.0.19/content new file mode 100644 index 000000000..31e4d9fb6 --- /dev/null +++ b/rt/etc/upgrade/4.0.19/content @@ -0,0 +1,29 @@ +use strict; +use warnings; + +our @Initial = ( + sub { + use RT::CustomFields; + my $cfs = RT::CustomFields->new(RT->SystemUser); + $cfs->{'find_disabled_rows'} = 1; + $cfs->Limit( FIELD => 'LookupType', VALUE => 'RT::FM::Class-RT::FM::Article' ); + while ( my $cf = $cfs->Next ) { + my ($ret, $msg) = $cf->__Set( Field => 'LookupType', Value => 'RT::Class-RT::Article' ); + RT->Logger->warning("Update Custom Field LookupType for CF.".$cf->Id." $msg"); + } + return 1; + }, + + sub { + use RT::ObjectCustomFieldValues; + my $ocfvs = RT::ObjectCustomFieldValues->new(RT->System); + $ocfvs->{'find_expired_rows'} = 1; + $ocfvs->Limit( FIELD => 'ObjectType', VALUE => 'RT::FM::Article' ); + while ( my $ocfv = $ocfvs->Next ) { + my ($ret, $msg) = $ocfv->__Set( Field => 'ObjectType', Value => 'RT::Article' ); + RT->Logger->warning("Updated CF ".$ocfv->__Value('CustomField')." Value for Article ".$ocfv->__Value('ObjectId')); + } + return 1; + }, +); +