[Rt-commit] r17329 - in rt/3.8/trunk: .
falcone at bestpractical.com
falcone at bestpractical.com
Wed Dec 24 12:43:50 EST 2008
Author: falcone
Date: Wed Dec 24 12:43:50 2008
New Revision: 17329
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/share/html/Elements/EditCustomField
Log:
r42825 at ketch: falcone | 2008-12-24 12:36:27 -0500
Reapply elacour's patch for the following:
Fix the following problems:
- If customfield validation fails on Ticket web creation, then we loose
selected customfield values of CF type "select multiple values". User need to
select them again.
- If customfield edition is activated (via callback) on Ticket/Update.html and
we wan't to enforce CF validation, then same problem appears.
Modified: rt/3.8/trunk/share/html/Elements/EditCustomField
==============================================================================
--- rt/3.8/trunk/share/html/Elements/EditCustomField (original)
+++ rt/3.8/trunk/share/html/Elements/EditCustomField Wed Dec 24 12:43:50 2008
@@ -59,7 +59,13 @@
$Values = $Object->CustomFieldValues( $CustomField->id );
$Values->Columns( qw( id CustomField ObjectType ObjectId Disabled Content ContentType ContentEncoding SortOrder Creator Created LastUpdatedBy LastUpdated ) );
$NamePrefix ||= join('-', 'Object', ref($Object), $Object->Id, 'CustomField', '');
-} elsif (not $Default) {
+}
+
+# Don't take care of $Values if there isn't values inside
+undef ( $Values ) unless ( $Values->Count );
+
+# Always fill $Default with submited values if it's empty
+if ( not $Default ) {
my %TOP = $m->request_args;
$Default = $TOP{ $NamePrefix .$CustomField->Id . '-Values' }
|| $TOP{ $NamePrefix .$CustomField->Id . '-Value' };
More information about the Rt-commit
mailing list