[otrs-cvs] otrs/Kernel/Modules AgentTicketProcess.pm,1.37,1.38
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/otrs/Kernel/Modules
In directory lancelot:/tmp/cvs-serv32723/Kernel/Modules
Modified Files:
AgentTicketProcess.pm
Log Message:
- 2013-02-06 Fixed bug#9118 - TicketDynamicFieldUpdate history entry added even if value has not been updated.
Author: cr
Index: AgentTicketProcess.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/Modules/AgentTicketProcess.pm,v
retrieving revision 1.37
retrieving revision 1.38
diff -2 -u -d -r1.37 -r1.38
--- AgentTicketProcess.pm 1 Feb 2013 18:42:01 -0000 1.37
+++ AgentTicketProcess.pm 6 Feb 2013 15:42:23 -0000 1.38
@@ -419,7 +419,31 @@
# All submitted DynamicFields
- # used for ACL checking
- my %DynamicFieldCheckParam = map { $_ => $Param{GetParam}{$_} }
- grep {m{^DynamicField_}xms} ( keys %{ $Param{GetParam} } );
+ # get dynamic field values form http request
+ my %DynamicFieldValues;
+
+ # cycle trough the activated Dynamic Fields for this screen
+ DYNAMICFIELD:
+ for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {
+ next DYNAMICFIELD if !IsHashRefWithData($DynamicFieldConfig);
+
+ # extract the dynamic field value form the web request
+ $DynamicFieldValues{ $DynamicFieldConfig->{Name} }
+ = $Self->{BackendObject}->EditFieldValueGet(
+ DynamicFieldConfig => $DynamicFieldConfig,
+ ParamObject => $Self->{ParamObject},
+ LayoutObject => $Self->{LayoutObject},
+ );
+ }
+
+ # convert dynamic field values into a structure for ACLs
+ my %DynamicFieldCheckParam;
+ DYNAMICFIELD:
+ for my $DynamicField ( sort keys %DynamicFieldValues ) {
+ next DYNAMICFIELD if !$DynamicField;
+ next DYNAMICFIELD if !$DynamicFieldValues{$DynamicField};
+
+ $DynamicFieldCheckParam{ 'DynamicField_' . $DynamicField }
+ = $DynamicFieldValues{$DynamicField};
+ }
# Get the activity dialog's Submit Param's or Config Params
@@ -478,7 +502,7 @@
@JSONCollector,
{
- Name => 'DynamicField_' . $DynamicFieldConfig->{Name},
- Data => $PossibleValues,
- SelectedID => $Param{GetParam}{ 'DynamicField_' . $DynamicFieldConfig->{Name} },
+ Name => 'DynamicField_' . $DynamicFieldConfig->{Name},
+ Data => $PossibleValues,
+ SelectedID => $DynamicFieldValues{ $DynamicFieldConfig->{Name} },
Translation => $DynamicFieldConfig->{Config}->{TranslatableValues} || 0,
Max => 100,
@@ -818,5 +842,10 @@
# If we got a submitted param, take it and next out
- if ($Value) {
+ if (
+ IsStringWithData($Value)
+ || IsArrayRefWithData($Value)
+ || IsHashRefWithData($Value)
+ )
+ {
$GetParam{$CurrentField} = $Value;
next DIALOGFIELD;
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log