[Rt-commit] rt branch, 4.0/custom-fields-groups, updated. rt-4.0.4-254-g1d64331
Alex Vandiver
alexmv at bestpractical.com
Mon Nov 5 17:07:26 EST 2012
The branch, 4.0/custom-fields-groups has been updated
via 1d643318ce622204403d37b97df6ad3eeeab307f (commit)
via c1ed720eb6ad7685c6c055b140e04fbab8df3956 (commit)
from 3a262ec94f6801ca0c1b63bccc48662b9061b004 (commit)
Summary of changes:
lib/RT/Record.pm | 2 ++
share/html/Elements/EditCustomFieldCustomGroupings | 2 ++
share/html/Ticket/Create.html | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit c1ed720eb6ad7685c6c055b140e04fbab8df3956
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sun May 20 17:05:30 2012 -0300
Perl 5.16 is much pickier about undef values being passed to the utf8 subs
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 71bbec4..479a055 100644
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -638,6 +638,8 @@ sub __Value {
my $value = $self->SUPER::__Value($field);
+ return undef if (!defined $value);
+
if ( $args{'decode_utf8'} ) {
if ( !utf8::is_utf8($value) ) {
utf8::decode($value);
commit 1d643318ce622204403d37b97df6ad3eeeab307f
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Nov 5 17:05:58 2012 -0500
Don't pass one shared CustomFields object between CF grouping lists
In the simple case os passing one $CustomFields into
EditCustomFieldCustomGroupings, the same $CustomFields is passed to each
EditCustomFields component, causing it to be repeatedly limited.
Instead pass in a generator sub, which allows us to produce a distinct
object for each grouping.
diff --git a/share/html/Elements/EditCustomFieldCustomGroupings b/share/html/Elements/EditCustomFieldCustomGroupings
index 8ff7797..3bc446e 100644
--- a/share/html/Elements/EditCustomFieldCustomGroupings
+++ b/share/html/Elements/EditCustomFieldCustomGroupings
@@ -4,11 +4,13 @@
class => $css_class .' '. ($group? CSSClass("$css_class-$group") : ''),
hide_empty => 1,
&>
+% $ARGS{CustomFields} = $CustomFieldGenerator->() if $CustomFieldGenerator;
<& EditCustomFields, %ARGS, Object => $Object, Grouping => $group &>
</&>
% }
<%ARGS>
$Object
+$CustomFieldGenerator => undef,
</%ARGS>
<%INIT>
my $css_class = lc(ref($Object)||$Object);
diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index d113186..1ccef08 100755
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -116,7 +116,7 @@
<& /Elements/EditCustomFieldCustomGroupings,
%ARGS,
Object => $ticket,
- CustomFields => $QueueObj->TicketCustomFields,
+ CustomFieldGenerator => sub { $QueueObj->TicketCustomFields },
DefaultsFromTopArguments => 0,
&>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list