[SOLVED] Shows EscalationSolutionTime in CustomerTicketZoom

Moderator: crythias

Post Reply
pazt
Znuny newbie
Posts: 18
Joined: 06 Mar 2016, 21:06
Znuny Version: 5.0.22
Real Name: Thiago Paz
Company: Landis+Gyr

[SOLVED] Shows EscalationSolutionTime in CustomerTicketZoom

Post by pazt »

Is it possible shows EscalationSolutionTime in CustomerTicketZoom?

I edit Ticket::Frontend::CustomerTicketZoom###AttributesView in Frontend::Customer::Ticket::ViewZoom, and insert Key: SolutionTime and Content: 1. But it doesn't work

Thanks
PazT

OTRS 5.0.22 | ITSM 5.0.22 | Ubuntu 16.04 LTS | MySQL 5.7
root
Administrator
Posts: 3961
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Shows EscalationSolutionTime in CustomerTicketZoom

Post by root »

Hi,

Did you have defined a solution time in the queue or via a SAL?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
pazt
Znuny newbie
Posts: 18
Joined: 06 Mar 2016, 21:06
Znuny Version: 5.0.22
Real Name: Thiago Paz
Company: Landis+Gyr

Re: Shows EscalationSolutionTime in CustomerTicketZoom

Post by pazt »

root wrote:Hi,

Did you have defined a solution time in the queue or via a SAL?

- Roy
Yes. I did. I can see it on AgentTicketZoom.
PazT

OTRS 5.0.22 | ITSM 5.0.22 | Ubuntu 16.04 LTS | MySQL 5.7
root
Administrator
Posts: 3961
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Shows EscalationSolutionTime in CustomerTicketZoom

Post by root »

Hi,

Looks like this is not possible for CustomerTicketZoom, I quick checked the template https://github.com/OTRS/otrs/blob/rel-5 ... ketZoom.tt. Maybe you can customize the template to display the SolutionTimeDestinationDate (see http://doc.otrs.com/doc/api/otrs/stable ... #TicketGet`)

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
pazt
Znuny newbie
Posts: 18
Joined: 06 Mar 2016, 21:06
Znuny Version: 5.0.22
Real Name: Thiago Paz
Company: Landis+Gyr

Re: Shows EscalationSolutionTime in CustomerTicketZoom

Post by pazt »

Roy, thanks for the advice. I'm very excited cause it's my first contribution here on OTRS forum.

Roy quotes:
First of all, copy the two files below to /opt/otrs/Custom directory

/opt/otrs/Kernel/Modules/CustomerTicketZoom.pm
to
/opt/otrs/Custom/Kernel/Modules/CustomerTicketZoom.pm

AND

/opt/otrs/Kernel/Output/HTML/Templates/Standard/CustomerTicketZoom.tt
to
/opt/otrs/Custom/Kernel/Output/HTML/Templates/Standard/CustomerTicketZoom.tt

Note:
You must create the directory-trees:

mkdir -p /opt/otrs/Custom/Kernel/Modules/
mkdir -p /opt/otrs/Custom/Kernel/Output/HTML/Templates/Standard/

Otherwise you'll get the error No such file or directory or something like that

Here we go:

1: Access Frontend::Customer::Ticket::ViewZoom in Admin >> SysConfig

in Ticket::Frontend::CustomerTicketZoom###AttributesView enter information:

Key: SolutionTime | Content: 1
Key: Service | Content: 1
Key: SLA | Content: 1

**Service and SLA are mandatory**

---

2: Edit /opt/otrs/Custom/Kernel/Modules/CustomerTicketZoom.pm file

under SLA "if condition" block, perhaps line number 1025, enter the code below:

Code: Select all

if (
    defined $Param{SolutionTime}
    && $ConfigObject->Get('Ticket::Service')
    && $Config->{AttributesView}->{SolutionTime}
    )
{
    $Param{SolutionTimeHuman} = $LayoutObject->CustomerAgeInHours(
        Age   => $Param{SolutionTime},
        Space => ' ',
    );

    $LayoutObject->Block(
        Name => 'SolutionTime',
        Data => \%Param
    );
}
3: Edit /opt/otrs/Custom/Kernel/Output/HTML/Templates/Standard/CustomerTicketZoom.tt file

under SLA RenderBlock, perhaps line number 211, enter the code below:

Code: Select all

[% RenderBlockStart("SolutionTime") %]                        
                    <li><span class="Key">[% Translate("Solution Time") | html %]:</span>
                    <span title="[% Translate(Data.SolutionTime) | html %]">[% Data.SolutionTimeDestinationDate | Localize("TimeShort") %] ([% Data.SolutionTimeHuman | html %])</span></li>
[% RenderBlockEnd("SolutionTime") %]
4: Stop Apache Server
sudo service apache2 stop

5: Re-Setting permissions to otrs directory
sudo perl /opt/otrs/bin/otrs.SetPermissions.pl --otrs-user=otrs --web-group=www-data /opt/otrs

6: Start Apache Sever
sudo service apache2 start

Done! It's worked well with OTRS 5.0.22

Enjoy it
Last edited by pazt on 08 Sep 2017, 22:18, edited 1 time in total.
PazT

OTRS 5.0.22 | ITSM 5.0.22 | Ubuntu 16.04 LTS | MySQL 5.7
root
Administrator
Posts: 3961
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Shows EscalationSolutionTime in CustomerTicketZoom

Post by root »

Hi,

So far so good. But did you read the file Custom/README?

Please copy the original file /opt/otrs/Kernel/Output/HTML/Templates/Standard/CustomerTicketZoom.tt to /opt/otrs/Custom/Kernel/Output/HTML/Templates/Standard/CustomerTicketZoom.tt and modify this one.

This will work for nearly everything, only some exceptions like Javascript and CSS file e.g. - just as a recommendation.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
pazt
Znuny newbie
Posts: 18
Joined: 06 Mar 2016, 21:06
Znuny Version: 5.0.22
Real Name: Thiago Paz
Company: Landis+Gyr

Shows EscalationSolutionTime in CustomerTicketZoom

Post by pazt »

root wrote:Hi,

So far so good. But did you read the file Custom/README?

Please copy the original file /opt/otrs/Kernel/Output/HTML/Templates/Standard/CustomerTicketZoom.tt to /opt/otrs/Custom/Kernel/Output/HTML/Templates/Standard/CustomerTicketZoom.tt and modify this one.

This will work for nearly everything, only some exceptions like Javascript and CSS file e.g. - just as a recommendation.

- Roy
Recommendation Added.

Roy, could you please set this topic as SOLVED?

Thanks
PazT

OTRS 5.0.22 | ITSM 5.0.22 | Ubuntu 16.04 LTS | MySQL 5.7
Post Reply