How to hide "Priority" from the screen create phone ticket?

Moderator: crythias

Post Reply
drodralv
OTRS newbie
Posts: 39
Joined: 26 Jul 2019, 08:25
OTRS Version?: 5.0.28

How to hide "Priority" from the screen create phone ticket?

Post by drodralv »

Hi!

I was checking an old ticket about that, i have questions:

The code i have in DTL file for Phoneticket is this one below:

Code: Select all

<div class="Clear"></div>

                        <label for="PriorityID">[% Translate("Priority") | html %]:</label>
                        <div class="Field">
                        [% Data.PriorityStrg %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    $('#PriorityID').bind('change', function (Event) {
        Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'PriorityID', [ 'TypeID', 'Dest', 'NewUserID','NewResponsibleID', 'NextStateID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
    });
//]]></script>
[% END %]
                        </div>
                        <div class="Clear"></div>
Should be like this one in order to hide that field?

Code: Select all

<div class="Hidden"><div class="Clear"></div>

                        <label for="PriorityID">[% Translate("Priority") | html %]:</label>
                        <div class="Field">
                        [% Data.PriorityStrg %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    $('#PriorityID').bind('change', function (Event) {
        Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'PriorityID', [ 'TypeID', 'Dest', 'NewUserID','NewResponsibleID', 'NextStateID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
    });
//]]></script>
[% END %]
                        </div>
                        <div class="Clear"></div></div>
Or where exactly should be that div class Hidden?

Sorry for being a newbie.

Thanks in advance

drodralv
OTRS newbie
Posts: 39
Joined: 26 Jul 2019, 08:25
OTRS Version?: 5.0.28

Re: How to hide "Priority" from the screen create phone ticket?

Post by drodralv »

About this change, can be done replacing the file or should be made editting the existing file? Also, OTRS should be restarted or any specific command executed?

Thank you

zzz
OTRS ninja
Posts: 458
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin Yazi
Company: Efflux GmbH
Contact:

Re: How to hide "Priority" from the screen create phone ticket?

Post by zzz »

Hey,

Copy the changed lines to the new file and delete the cache with /opt/otrs/bin/otrs.Console.pl Maint::Cache::Delete
But I can't tell you if that'll work without extra adjustments.

Best regards
Emin
Professional OTRS services for development, consulting, hosting and support:
efflux.de – German | efflux.de/en/ – English

Free and premium OTRS add-ons (TextModule, AdBlocker, ModernSkin ... growing): portal.efflux.de

drodralv
OTRS newbie
Posts: 39
Joined: 26 Jul 2019, 08:25
OTRS Version?: 5.0.28

Re: How to hide "Priority" from the screen create phone ticket?

Post by drodralv »

Hi,
It didn´t work. This is the status of the text i added div class Hidden:

Code: Select all

 <div class="Hidden"><label for="PriorityID">[% Translate("Priority") | html %]:</label>
                        <div class="Field">
                        [% Data.PriorityStrg %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    $('#PriorityID').bind('change', function (Event) {
        Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'PriorityID', [ 'TypeID', 'Dest', 'NewUserID','NewResponsibleID', 'NextStateID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
    });
//]]></script>
[% END %]
                        </div>

Anything wrong with the code i added? maybe wrong position for the </div> ?


Here is the file i modified:

\opt\otrs\Kernel\Output\HTML\Templates\Standard\AgentTicketPhone.tt.save

And here i have the modules (.pm files):

\opt\otrs\Kernel\Modules


Thank you

zzz
OTRS ninja
Posts: 458
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin Yazi
Company: Efflux GmbH
Contact:

Re: How to hide "Priority" from the screen create phone ticket?

Post by zzz »

You're editing the wrong file.
You need to edit \opt\otrs\Kernel\Output\HTML\Templates\Standard\AgentTicketPhone.tt without the .save

What exactly are you expecting the code to do?
Professional OTRS services for development, consulting, hosting and support:
efflux.de – German | efflux.de/en/ – English

Free and premium OTRS add-ons (TextModule, AdBlocker, ModernSkin ... growing): portal.efflux.de

drodralv
OTRS newbie
Posts: 39
Joined: 26 Jul 2019, 08:25
OTRS Version?: 5.0.28

Re: How to hide "Priority" from the screen create phone ticket?

Post by drodralv »

Hi!

Thank you for your post. I will ask to sysadmin to find me that .tt file, i can´t see that .tt files using "Generate Support Bundle" option from OTRS web.

I´m trying to hide Priority Dynamic field from the PhoneNew screen. I will determine the critically by Service, review the matrix impact/critically to get the Priority automatically, just choosing "Impact" while creating a ticket. But having "Priority" mandatory from that view, i don´t know if that have much sense.

Thank you again

Post Reply