znuny / Znuny

Znuny/Znuny LTS is a fork of the ((OTRS)) Community Edition, one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management.
https://www.znuny.org
GNU General Public License v3.0
333 stars 82 forks source link

Bug - AgentTicketProcess Do Not Start / Honor Escalation Response Time #514

Open mo-azfar opened 7 months ago

mo-azfar commented 7 months ago

Environment

Expected behavior

Creating process ticket from agent interface with SLA selected and article type phone defined, escalation response time should start counting / display.

Actual behavior

Creating process ticket from agent interface with SLA selected and article type phone defined, escalation response time somehow did not start counting / not displaying.

How to reproduce

Steps to reproduce the behavior:

  1. Configure process management with SLA and article type 'phone'
  2. Create process ticket from agent interface.
  3. First Response Time will be empty / no value.

Additional information

Expecting the behaviour to work like AgentTicketPhone which not bypass Response time.

Screenshots

image

mo-azfar commented 7 months ago

Im currently tackle this with following code at AgentTicketProcess.pm Perhaps you guys have a better approach.

            my $From = "\"$Self->{UserFullname}\" <$Self->{UserEmail}>";

            # --
            # mo-azfar - 2023.11.20 - to honor escalation response time.
            # --
            my $SenderType = 'agent';
            if ( $Param{GetParam}->{CustomerUserID} )
            {
                my $CustomerUserObject = $Kernel::OM->Get('Kernel::System::CustomerUser');
                my %CustomerUserData = $CustomerUserObject->CustomerUserDataGet(
                    User => $Param{GetParam}->{CustomerUserID},
                );

                $From = "\"$CustomerUserData{UserFullname}" . "\" <$CustomerUserData{UserEmail}>";
                $SenderType = 'customer';
            }  
            # --

            $ArticleID = $ArticleBackendObject->ArticleCreate(
                TicketID             => $TicketID,
                # --
                # mo-azfar - 2023.11.20 - honor escalation response time
                # --
                #SenderType           => 'agent',
                SenderType           => $SenderType,
                # --
                IsVisibleForCustomer => $ActivityDialog->{Fields}->{Article}->{Config}->{IsVisibleForCustomer} // 0,
                From                 => $From,
                MimeType             => $MimeType,
                Charset              => $LayoutObject->{UserCharset},
                UserID               => $Self->{UserID},
                HistoryType          => $HistoryType,
                HistoryComment       => $HistoryComment,
                Body                 => $Param{GetParam}{Body},
                Subject              => $Param{GetParam}{Subject},
                ForceNotificationToUserID => $ActivityDialog->{Fields}->{Article}->{Config}->{InformAgents}
                ? $Param{GetParam}{InformUserID}
                : [],
            );
dignin commented 6 months ago

@mo-azfar we will get back to you on this one.