Since I’ve made a number of other changes, I can’t just give you a
patch. But yes, I thought it was a bug, and I fixed it thusly in
/path/to/your/rt/lib/RT/Interface/Web.pm (this also works for something
that isn’t a “select one value”):
@@ -1217,6 +1217,8 @@
my $cf_values = $Object->CustomFieldValues($cf);
my %values_hash;
-
my @addcfresults = (); foreach my $value (@values) { next unless length($value);
@@ -1229,17 +1231,20 @@
Value => $value
);
push ( @results, $msg );
-
push( @addcfresults, $msg ); } }
-
while ( my $cf_value = $cf_values->Next ) {
-
unless ( $values_hash{ $cf_value->Content }
== 1 ) {
-
my ( $val, $msg ) =
$Object->DeleteCustomFieldValue(
-
Field => $cf,
-
Value => $cf_value->Content
-
);
-
push ( @results, $msg);
-
if (!@addcfresults or
!$CustomFieldObj->MaxValues ) {
-
while ( my $cf_value = $cf_values->Next ) {
-
unless ( $values_hash{
$cf_value->Content } == 1 ) {
-
my ( $val, $msg ) =
$Object->DeleteCustomFieldValue(
-
Field => $cf,
-
Value => $cf_value->Content
-
);
-
push ( @results, $msg);
-
} } } }
Let me know if another diff type would be clearer for you to make the
change to your code.
Eric Schultz
United Online-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Philip
Kime
Sent: Sunday, June 04, 2006 2:37 PM
To: RT users
Subject: [rt-users] Strange message when changing “Select One Value” CFs
inRT 3.4.5
If I change a “Select one value” CF in RT 3.4.5, I get two messages, for
example:
- ClusterCountryCode FR changed to US
- Custom field value FR could not be found for custom field
ClusterCountryCode
The change is fine and works but the second message is odd (it comes
from CustomField_Overlay.pm) - it looks like it tries to change it twice
and fails the second time because the value is already changed? Any
comments? Is this a bug?
PK
Philip Kime
NOPS Systems Architect
310 401 0407