[Rt-commit] rt branch, 4.2/ticket-clone-cf-selected-values-missing, created. rt-4.2.3-84-g8b8e109
? sunnavy
sunnavy at bestpractical.com
Wed Apr 16 11:21:21 EDT 2014
The branch, 4.2/ticket-clone-cf-selected-values-missing has been created
at 8b8e109845075618027a35085546a555ff0111d4 (commit)
- Log -----------------------------------------------------------------
commit 8b8e109845075618027a35085546a555ff0111d4
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Apr 16 22:43:55 2014 +0800
check both of "-Values" and "-Value" to find default values in ValidateCustomFields
in 4b21442, we refactored cf input name into a sub, which caused select cf
current values "not selected" when cloning a ticket. see also #29751.
turned out that we hardcoded "-Value" in the clone code before, which is not
consistent with the cf default name. 4b21442 reveals a potential bug that we
missed to check "-Values" in ValidateCustomFields. this commit completes the
check(i.e. to check both "-Values" and "-Value"), like what we do for
$DECODED_ARGS in EditCustomField.
diff --git a/share/html/Elements/ValidateCustomFields b/share/html/Elements/ValidateCustomFields
index 4637fb5..43f8ebd 100644
--- a/share/html/Elements/ValidateCustomFields
+++ b/share/html/Elements/ValidateCustomFields
@@ -68,7 +68,7 @@ while ( my $CF = $CustomFields->Next ) {
next if $submitted->{"Values-Magic"} and exists $submitted->{"Values"}
and ref $submitted->{"Values"};
- $m->notes(('Field-' . $CF->Id) => $submitted->{Value} );
+ $m->notes(('Field-' . $CF->Id) => $submitted->{Values} // $submitted->{Value});
my @values = _NormalizeObjectCustomFieldValue(
CustomField => $CF,
-----------------------------------------------------------------------
More information about the rt-commit
mailing list