[otrs-cvs] otrs/Kernel/Modules AgentTicketProcess.pm,1.32,1.33

"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-serv819/Kernel/Modules

Modified Files:
	AgentTicketProcess.pm 
Log Message:
 - 2013-01-29 Fixed bug#9088 - ProcessManagement: Service field is not displayed in AgentTicketProcess.

Author: cr

Index: AgentTicketProcess.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/Modules/AgentTicketProcess.pm,v
retrieving revision 1.32
retrieving revision 1.33
diff -2 -u -d -r1.32 -r1.33
--- AgentTicketProcess.pm	21 Jan 2013 13:11:04 -0000	1.32
+++ AgentTicketProcess.pm	29 Jan 2013 22:24:34 -0000	1.33
@@ -105,5 +105,5 @@
         SLA            => 'SLAID',
         SLAID          => 'SLAID',
-        Service        => 'Service',
+        Service        => 'ServiceID',
         ServiceID      => 'ServiceID',
         Responsible    => 'ResponsibleID',
@@ -992,4 +992,20 @@
     }
 
+    # get also the IDs for the Required files (if they are not present)
+    if ( $GetParam{Queue} && !$GetParam{QueueID} ) {
+        $GetParam{QueueID} = $Self->{QueueObject}->QueueLookup( Queue => $GetParam{Queue} );
+    }
+    if ( $GetParam{State} && !$GetParam{StateID} ) {
+        $GetParam{StateID} = $Self->{StateObject}->StateLookup( State => $GetParam{State} );
+    }
+    if ( $GetParam{Lock} && !$GetParam{LockID} ) {
+        $GetParam{LockID} = $Self->{LockObject}->LockLookup( Lock => $GetParam{Lock} );
+    }
+    if ( $GetParam{Priority} && !$GetParam{PriorityID} ) {
+        $GetParam{PrioriyID} = $Self->{PriorityObject}->PriorityLookup(
+            Priority => $GetParam{Priority},
+        );
+    }
+
     # and finally we'll have the special parameters:
     $GetParam{ResponsibleAll} = $Self->{ParamObject}->GetParam( Param => 'ResponsibleAll' );
@@ -2690,6 +2706,7 @@
 
     my $SLAIDParam = $Param{GetParam}{SLAID};
-    $SelectedValue = $Self->{SLAObject}->SLALookup( SLAID => $SLAIDParam )
-        if ($SLAIDParam);
+    if ($SLAIDParam) {
+        $SelectedValue = $Self->{SLAObject}->SLALookup( SLAID => $SLAIDParam );
+    }
 
     if ( $Param{FieldName} eq 'SLA' ) {
@@ -2698,7 +2715,14 @@
 
             # Fetch DefaultValue from Config
-            $SelectedValue = $Self->{SLAObject}->SLALookup(
-                SLA => $Param{ActivityDialogField}->{DefaultValue} || '',
-            );
+            if (
+                defined $Param{ActivityDialogField}->{DefaultValue}
+                && $Param{ActivityDialogField}->{DefaultValue} ne ''
+                )
+            {
+                $SelectedValue = $Self->{SLAObject}->SLALookup(
+                    SLA => $Param{ActivityDialogField}->{DefaultValue},
+                );
+            }
+
             if ($SelectedValue) {
                 $SelectedValue = $Param{ActivityDialogField}->{DefaultValue};
@@ -2708,7 +2732,13 @@
     else {
         if ( !$SelectedValue ) {
-            $SelectedValue = $Self->{SLAObject}->SLALookup(
-                SLAID => $Param{ActivityDialogField}->{DefaultValue} || '',
-            );
+            if (
+                defined $Param{ActivityDialogField}->{DefaultValue}
+                && $Param{ActivityDialogField}->{DefaultValue} ne ''
+                )
+            {
+                $SelectedValue = $Self->{SLAObject}->SLALookup(
+                    SLA => $Param{ActivityDialogField}->{DefaultValue},
+                );
+            }
         }
     }
@@ -2819,7 +2849,13 @@
 
             # Fetch DefaultValue from Config
-            $SelectedValue = $Self->{ServiceObject}->ServiceLookup(
-                Service => $Param{ActivityDialogField}->{DefaultValue} || '',
-            );
+            if (
+                defined $Param{ActivityDialogField}->{DefaultValue}
+                && $Param{ActivityDialogField}->{DefaultValue} ne ''
+                )
+            {
+                $SelectedValue = $Self->{ServiceObject}->ServiceLookup(
+                    Service => $Param{ActivityDialogField}->{DefaultValue},
+                );
+            }
             if ($SelectedValue) {
                 $SelectedValue = $Param{ActivityDialogField}->{DefaultValue};
@@ -2829,7 +2865,13 @@
     else {
         if ( !$SelectedValue ) {
-            $SelectedValue = $Self->{ServiceObject}->ServiceLookup(
-                ServiceID => $Param{ActivityDialogField}->{DefaultValue} || '',
-            );
+            if (
+                defined $Param{ActivityDialogField}->{DefaultValue}
+                && $Param{ActivityDialogField}->{DefaultValue} ne ''
+                )
+            {
+                $SelectedValue = $Self->{ServiceObject}->ServiceLookup(
+                    Service => $Param{ActivityDialogField}->{DefaultValue},
+                );
+            }
         }
     }
---------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.