%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
Object => $CustomFieldObj,
ARGSRef => \%ARGS
);
- $CustomFieldObj->SetValuesClass( $ValuesClass );
+ if ( ($ValuesClass||'RT::CustomFieldValues') ne $CustomFieldObj->ValuesClass ) {
+ my $original = $CustomFieldObj->ValuesClass;
+ my ($good, $msg) = $CustomFieldObj->SetValuesClass( $ValuesClass );
+ if ( $good ) {
+ $msg = loc("[_1] changed from '[_2]' to '[_3]'",
+ loc("Field values source"), $original, $ValuesClass );
+ }
+ push @results, $msg;
+ }
# Set the render type if we have it, but unset it if the new type doesn't
# support render types
my $paramtag = "CustomField-". $CustomFieldObj->Id ."-Value";
# Delete any fields that want to be deleted
foreach my $key ( keys %ARGS ) {
- next unless $key =~ /^Delete-$paramtag-(\d+)$/o;
+ next unless $key =~ /^Delete-$paramtag-(\d+)$/;
my ($val, $msg) = $CustomFieldObj->DeleteValue( $1 );
push (@results, $msg);
}