[otrs-cvs] ITSMIncidentProblemManagement/Kernel/Modules AgentTicketActionCommon.pm, 1.36, 1.37 AgentTicketPrint.pm, 1.12, 1.13 AgentTicketPhone.pm, 1.54, 1.55 CustomerTicketZoom.pm, 1.23, 1.24 AgentTicketEmail.pm, 1.47, 1.48 AgentTicketZoom.pm, 1.41, 1.42

"CVS commits notifications of OTRS.org" <[email protected]> Tue, 26 Mar 2013 14:14:05 +0000
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/ITSMIncidentProblemManagement/Kernel/Modules
In directory lancelot:/tmp/cvs-serv29469/Kernel/Modules

Modified Files:
	AgentTicketActionCommon.pm AgentTicketPrint.pm 
	AgentTicketPhone.pm CustomerTicketZoom.pm AgentTicketEmail.pm 
	AgentTicketZoom.pm 
Log Message:
Updated file to latest framework version.

Author: ub

Index: AgentTicketActionCommon.pm
===================================================================
RCS file: /home/cvs/ITSMIncidentProblemManagement/Kernel/Modules/AgentTicketActionCommon.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -2 -u -d -r1.36 -r1.37
--- AgentTicketActionCommon.pm	30 Jan 2013 14:05:10 -0000	1.36
+++ AgentTicketActionCommon.pm	26 Mar 2013 14:14:00 -0000	1.37
@@ -130,5 +130,5 @@
     my %AclAction = $Self->{TicketObject}->TicketAclActionData();
 
-    # check if ACL resctictions if exist
+    # check if ACL restrictions exist
     if ( IsHashRefWithData( \%AclAction ) ) {
 
@@ -859,10 +859,10 @@
             }
 
-            # remove pre submited attachments
+            # remove pre submitted attachments
             $Self->{UploadCacheObject}->FormIDRemove( FormID => $Self->{FormID} );
         }
 
         # set dynamic fields
-        # cycle trough the activated Dynamic Fields for this screen
+        # cycle through the activated Dynamic Fields for this screen
         DYNAMICFIELD:
         for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {
@@ -932,5 +932,5 @@
             }
 
-            # set pending time on pendig state
+            # set pending time on pending state
             elsif ( $StateData{TypeName} =~ /^pending/i ) {
 
@@ -1048,5 +1048,5 @@
             );
 
-            # convert possible values key => value to key => key for ACLs usign a Hash slice
+            # convert possible values key => value to key => key for ACLs using a Hash slice
             my %AclData = %{$PossibleValues};
             @AclData{ keys %AclData } = keys %AclData;
@@ -1214,5 +1214,5 @@
 
             # only get values for Ticket fields (all screens based on AgentTickeActionCommon
-            # generates a new article, then article fields will be always empty at the beginign)
+            # generates a new article, then article fields will be always empty at the beginning)
             if ( $DynamicFieldConfig->{ObjectType} eq 'Ticket' ) {
 
@@ -1306,5 +1306,5 @@
             Name  => 'TypeID',
             SelectedID   => $Param{TypeID},
-            PossibleNone => 0,
+            PossibleNone => 1,
             Sort         => 'AlphanumericValue',
             Translation  => 0,
@@ -2007,5 +2007,5 @@
     my @UpdatableFields;
 
-    # set the fields that can be updatable via AJAXUpdate
+    # set the fields that can be updateable via AJAXUpdate
     if ( !$Param{OnlyDynamicFields} ) {
         @UpdatableFields
@@ -2016,5 +2016,5 @@
     }
 
-    # cycle trough the activated Dynamic Fields for this screen
+    # cycle through the activated Dynamic Fields for this screen
     DYNAMICFIELD:
     for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {

Author: ub

Index: AgentTicketPrint.pm
===================================================================
RCS file: /home/cvs/ITSMIncidentProblemManagement/Kernel/Modules/AgentTicketPrint.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -2 -u -d -r1.12 -r1.13
--- AgentTicketPrint.pm	22 Nov 2012 13:50:27 -0000	1.12
+++ AgentTicketPrint.pm	26 Mar 2013 14:14:00 -0000	1.13
@@ -1,5 +1,5 @@
 # --
 # Kernel/Modules/AgentTicketPrint.pm - print layout for agent interface
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -100,5 +100,5 @@
     my %AclAction = $Self->{TicketObject}->TicketAclActionData();
 
-    # check if ACL resctictions if exist
+    # check if ACL restrictions exist
     if ( IsHashRefWithData( \%AclAction ) ) {
 
@@ -215,9 +215,4 @@
         );
     }
-    elsif ( $Ticket{CustomerID} ) {
-        %CustomerData = $Self->{CustomerUserObject}->CustomerUserDataGet(
-            CustomerID => $Ticket{CustomerID},
-        );
-    }
 
     # do some html quoting

Author: ub

Index: AgentTicketPhone.pm
===================================================================
RCS file: /home/cvs/ITSMIncidentProblemManagement/Kernel/Modules/AgentTicketPhone.pm,v
retrieving revision 1.54
retrieving revision 1.55
diff -2 -u -d -r1.54 -r1.55
--- AgentTicketPhone.pm	8 Feb 2013 11:27:42 -0000	1.54
+++ AgentTicketPhone.pm	26 Mar 2013 14:14:00 -0000	1.55
@@ -401,7 +401,10 @@
         # check email address
         my $CountFrom = scalar @MultipleCustomer || 1;
-        my %CustomerDataFrom = $Self->{CustomerUserObject}->CustomerUserDataGet(
-            User => $Article{CustomerUserID},
-        ) if $Article{CustomerUserID};
+        my %CustomerDataFrom;
+        if ( $Article{CustomerUserID} ) {
+            %CustomerDataFrom = $Self->{CustomerUserObject}->CustomerUserDataGet(
+                User => $Article{CustomerUserID},
+            );
+        }
 
         for my $Email ( Mail::Address->parse($ArticleFrom) ) {

Author: ub

Index: CustomerTicketZoom.pm
===================================================================
RCS file: /home/cvs/ITSMIncidentProblemManagement/Kernel/Modules/CustomerTicketZoom.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -2 -u -d -r1.23 -r1.24
--- CustomerTicketZoom.pm	16 Jan 2013 12:08:44 -0000	1.23
+++ CustomerTicketZoom.pm	26 Mar 2013 14:14:00 -0000	1.24
@@ -122,5 +122,5 @@
         $Self->{TicketID} = $Self->{TicketObject}->TicketIDLookup(
             TicketNumber => $Self->{ParamObject}->GetParam( Param => 'TicketNumber' ),
-            UserID => $Self->{UserID},
+            UserID       => $Self->{UserID},
         );
     }
@@ -533,5 +533,5 @@
         }
 
-        # unlock ticket if agent is on vacation
+        # unlock ticket if agent is on vacation or invalid
         my $LockAction;
         if ( $Ticket{OwnerID} ) {
@@ -539,5 +539,5 @@
                 UserID => $Ticket{OwnerID},
             );
-            if ( %User && $User{OutOfOffice} && $User{OutOfOfficeMessage} ) {
+            if ( %User && ( $User{OutOfOfficeMessage} || $User{ValidID} ne '1' ) ) {
                 $LockAction = 'unlock';
             }
@@ -1020,5 +1020,10 @@
             # we don't need the whole Activity config,
             # just the Activity Dialogs of the current Activity
-            %{$NextActivityDialogs} = %{ $NextActivityDialogs->{ActivityDialog} };
+            if ( IsHashRefWithData( $NextActivityDialogs->{ActivityDialog} ) ) {
+                %{$NextActivityDialogs} = %{ $NextActivityDialogs->{ActivityDialog} };
+            }
+            else {
+                $NextActivityDialogs = {};
+            }
 
             # ACL Check is done in the initial "Run" statement
@@ -1178,6 +1183,6 @@
 
     # Expand option
-    my $ExpandOption = ( $Self->{ZoomExpand} ? 'One' : 'All' );
-    my $ExpandPlural = ( $ExpandOption eq 'All' ? 's' : '' );
+    my $ExpandOption = ( $Self->{ZoomExpand}    ? 'One' : 'All' );
+    my $ExpandPlural = ( $ExpandOption eq 'All' ? 's'   : '' );
     $Self->{LayoutObject}->Block(
         Name => 'Expand',
@@ -1447,4 +1452,12 @@
     }
 
+    # fallback to ticket info if there is no article
+    if ( !IsHashRefWithData( \%Article ) ) {
+        %Article = %Param;
+        if ( !$Article{StateID} ) {
+            $Article{StateID} = $Param{TicketStateID}
+        }
+    }
+
     # check follow up permissions
     my $FollowUpPossible

Author: ub

Index: AgentTicketEmail.pm
===================================================================
RCS file: /home/cvs/ITSMIncidentProblemManagement/Kernel/Modules/AgentTicketEmail.pm,v
retrieving revision 1.47
retrieving revision 1.48
diff -2 -u -d -r1.47 -r1.48
--- AgentTicketEmail.pm	8 Feb 2013 11:27:42 -0000	1.47
+++ AgentTicketEmail.pm	26 Mar 2013 14:14:00 -0000	1.48
@@ -340,5 +340,5 @@
 # ---
 
-    # cycle trough the activated Dynamic Fields for this screen
+    # cycle through the activated Dynamic Fields for this screen
     DYNAMICFIELD:
     for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {
@@ -483,5 +483,5 @@
             my %DynamicFieldDefaults;
 
-            # cycle trough the activated Dynamic Fields for this screen
+            # cycle through the activated Dynamic Fields for this screen
             DYNAMICFIELD:
             for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {
@@ -512,5 +512,5 @@
             my %DynamicFieldHTML;
 
-            # cycle trough the activated Dynamic Fields for this screen
+            # cycle through the activated Dynamic Fields for this screen
             DYNAMICFIELD:
             for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {
@@ -800,5 +800,5 @@
         my %DynamicFieldHTML;
 
-        # cycle trough the activated Dynamic Fields for this screen
+        # cycle through the activated Dynamic Fields for this screen
         DYNAMICFIELD:
         for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {
@@ -1193,5 +1193,5 @@
 
         # set ticket dynamic fields
-        # cycle trough the activated Dynamic Fields for this screen
+        # cycle through the activated Dynamic Fields for this screen
         DYNAMICFIELD:
         for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {
@@ -1324,5 +1324,5 @@
 
         # set article dynamic fields
-        # cycle trough the activated Dynamic Fields for this screen
+        # cycle through the activated Dynamic Fields for this screen
         DYNAMICFIELD:
         for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {
@@ -1555,8 +1555,8 @@
         );
 
-        # update Dynamc Fields Possible Values via AJAX
+        # update Dynamic Fields Possible Values via AJAX
         my @DynamicFieldAJAX;
 
-        # cycle trough the activated Dynamic Fields for this screen
+        # cycle through the activated Dynamic Fields for this screen
         DYNAMICFIELD:
         for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {
@@ -1612,4 +1612,8 @@
         # run compose modules
         if ( ref $Self->{ConfigObject}->Get('Ticket::Frontend::ArticleComposeModule') eq 'HASH' ) {
+
+            # use QueueID from web request in compose modules
+            $GetParam{QueueID} = $QueueID;
+
             my %Jobs = %{ $Self->{ConfigObject}->Get('Ticket::Frontend::ArticleComposeModule') };
             for my $Job ( sort keys %Jobs ) {
@@ -1628,4 +1632,9 @@
                 my %Data = $Object->Data( %GetParam, Config => $Jobs{$Job} );
 
+                # get AJAX param values
+                if ( $Object->can('GetParamAJAX') ) {
+                    %GetParam = ( %GetParam, $Object->GetParamAJAX(%GetParam) )
+                }
+
                 my $Key = $Object->Option( %GetParam, Config => $Jobs{$Job} );
                 if ($Key) {
@@ -2406,5 +2415,5 @@
 
     # Dynamic fields
-    # cycle trough the activated Dynamic Fields for this screen
+    # cycle through the activated Dynamic Fields for this screen
     DYNAMICFIELD:
     for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {
@@ -2619,5 +2628,5 @@
     my @UpdatableFields;
 
-    # set the fields that can be updatable via AJAXUpdate
+    # set the fields that can be updateable via AJAXUpdate
     if ( !$Param{OnlyDynamicFields} ) {
         @UpdatableFields
@@ -2627,5 +2636,5 @@
     }
 
-    # cycle trough the activated Dynamic Fields for this screen
+    # cycle through the activated Dynamic Fields for this screen
     DYNAMICFIELD:
     for my $DynamicFieldConfig ( @{ $Self->{DynamicField} } ) {

Author: ub

Index: AgentTicketZoom.pm
===================================================================
RCS file: /home/cvs/ITSMIncidentProblemManagement/Kernel/Modules/AgentTicketZoom.pm,v
retrieving revision 1.41
retrieving revision 1.42
diff -2 -u -d -r1.41 -r1.42
--- AgentTicketZoom.pm	16 Jan 2013 12:08:44 -0000	1.41
+++ AgentTicketZoom.pm	26 Mar 2013 14:14:00 -0000	1.42
@@ -80,5 +80,5 @@
     $Self->{StripPlainBodyAsAttachment} = 1;
 
-    # check if rich text is enabled, if not only stip ascii attachments
+    # check if rich text is enabled, if not only strip ascii attachments
     if ( !$Self->{RichText} ) {
         $Self->{StripPlainBodyAsAttachment} = 2;
@@ -89,5 +89,5 @@
         $Self->{TicketID} = $Self->{TicketObject}->TicketIDLookup(
             TicketNumber => $Self->{ParamObject}->GetParam( Param => 'TicketNumber' ),
-            UserID => $Self->{UserID},
+            UserID       => $Self->{UserID},
         );
     }
@@ -176,5 +176,5 @@
     my %AclAction = $Self->{TicketObject}->TicketAclActionData();
 
-    # check if ACL resctictions if exist
+    # check if ACL restrictions exist
     if ( IsHashRefWithData( \%AclAction ) ) {
 
@@ -1128,12 +1128,4 @@
 # ---
 
-        # get print string for this dynamic field
-        # do not use ValueMaxChars here otherwise values will be trimmed also in Process Widget
-        my $ValueStrg = $Self->{BackendObject}->DisplayValueRender(
-            DynamicFieldConfig => $DynamicFieldConfig,
-            Value              => $Ticket{ 'DynamicField_' . $DynamicFieldConfig->{Name} },
-            LayoutObject       => $Self->{LayoutObject},
-        );
-
         # use translation here to be able to reduce the character length in the template
         my $Label = $Self->{LayoutObject}->{LanguageObject}->Get( $DynamicFieldConfig->{Label} );
@@ -1144,4 +1136,11 @@
             )
         {
+            my $ValueStrg = $Self->{BackendObject}->DisplayValueRender(
+                DynamicFieldConfig => $DynamicFieldConfig,
+                Value              => $Ticket{ 'DynamicField_' . $DynamicFieldConfig->{Name} },
+                LayoutObject       => $Self->{LayoutObject},
+                # no ValueMaxChars here, enough space available
+            );
+
             push @FieldsWidget, {
                 Name  => $DynamicFieldConfig->{Name},
@@ -1156,19 +1155,19 @@
         }
 
+        my $ValueStrg = $Self->{BackendObject}->DisplayValueRender(
+            DynamicFieldConfig => $DynamicFieldConfig,
+            Value              => $Ticket{ 'DynamicField_' . $DynamicFieldConfig->{Name} },
+            LayoutObject       => $Self->{LayoutObject},
+            ValueMaxChars      => 18, # limit for sidebar display
+        );
+
         if (
             $Self->{DisplaySettings}->{DynamicField}->{ $DynamicFieldConfig->{Name} }
             )
         {
-            my $TrimmedValue = $ValueStrg->{Value};
-
-            # trim the value so it can fit better in the sidebar
-            if ( length $ValueStrg->{Value} > 18 ) {
-                $TrimmedValue = substr( $ValueStrg->{Value}, 0, 18 ) . '...';
-            }
-
             push @FieldsSidebar, {
                 Name                        => $DynamicFieldConfig->{Name},
                 Title                       => $ValueStrg->{Title},
-                Value                       => $TrimmedValue,
+                Value                       => $ValueStrg->{Value},
                 Label                       => $Label,
                 Link                        => $ValueStrg->{Link},
@@ -1284,4 +1283,5 @@
                                 Name => 'ProcessWidgetDynamicFieldLink',
                                 Data => {
+                                    %Ticket,
                                     Value          => $Field->{Value},
                                     Title          => $Field->{Title},
@@ -1355,4 +1355,5 @@
                     Name => 'ProcessWidgetDynamicFieldLink',
                     Data => {
+                        %Ticket,
                         Value          => $Field->{Value},
                         Title          => $Field->{Title},
@@ -1388,4 +1389,5 @@
                 Name => 'TicketDynamicFieldLink',
                 Data => {
+                    %Ticket,
                     Value          => $Field->{Value},
                     Title          => $Field->{Title},
@@ -2293,4 +2295,5 @@
                 Name => 'ArticleDynamicFieldLink',
                 Data => {
+                    %Ticket,
                     Value                       => $ValueStrg->{Value},
                     Title                       => $ValueStrg->{Title},
---------------------------------------------------------------------
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