How to set Template choice to required

Moderator: crythias

Locked
legajer
Znuny newbie
Posts: 27
Joined: 06 Jul 2016, 10:56
Znuny Version: OTRS 5.0.13
Real Name: Jerry

How to set Template choice to required

Post by legajer »

Hello,

how do i set the choice of a template when creating an new email ticket to Required or mandatory.

An agent has 4 language choices, but it must be a mandatory choice.

i can't find a setting for this. I also looked in Core::Ticket.

Any help is appreciated.

Thanks!
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: How to set Template choice to required

Post by reneeb »

Is the "language choice" a dynamic field? Then you can set the value to "2" in the SysConfig option <screen>###DynamicField (where <screen> is the name of the screen where the dynamic field appears)
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
legajer
Znuny newbie
Posts: 27
Joined: 06 Jul 2016, 10:56
Znuny Version: OTRS 5.0.13
Real Name: Jerry

Re: How to set Template choice to required

Post by legajer »

Hi,

no it's not a DynamicField.
It's the choice for the StandardTemplateID, so you can choose between some standard answer text which then is pre-filled in the email which will be send.
setrequired.PNG
Maybe i was not clear enough, sorry for that.
You do not have the required permissions to view the files attached to this post.
legajer
Znuny newbie
Posts: 27
Joined: 06 Jul 2016, 10:56
Znuny Version: OTRS 5.0.13
Real Name: Jerry

Re: How to set Template choice to required

Post by legajer »

Bump

Anyone?

Thanks!
root
Administrator
Posts: 4253
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: How to set Template choice to required

Post by root »

Is it possible that this is a feature from an add on?
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 ?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: How to set Template choice to required

Post by reneeb »

@root: No that is a standard feature

@legajer: You could change the template:

Change in AgentTicketPhone.tt from

Code: Select all

                    <label for="StandardTemplateID">[% Translate("Text Template") | html %]:</label>
                    <div class="Field">
                        [% Data.StandardTemplateStrg %]
                        <p class="FieldExplanation">[% Translate("Setting a template will overwrite any text or attachment.") %]</p>
</div>
to

Code: Select all

                    <label for="StandardTemplateID" class="Mandatory"><span class="Marker">*</span> [% Translate("Text Template") | html %]:</label>
                    <div class="Field">
                        [% Data.StandardTemplateStrg %]
                        <p class="FieldExplanation">[% Translate("Setting a template will overwrite any text or attachment.") %]</p>
</div>
But this will just check with javascript. This is no server side validation that a template was chosen... And what happens if you have a queue without templates?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
legajer
Znuny newbie
Posts: 27
Joined: 06 Jul 2016, 10:56
Znuny Version: OTRS 5.0.13
Real Name: Jerry

Re: How to set Template choice to required

Post by legajer »

Thank you Renee,

i will test this tomorrow.
We now only use this system internally, so only agents will create a ticket.
There are just 2 queues and for both the same templates will be used.
I only made Create a new Email Ticket available.

So even if a incoming call is made, an agent will create a New Email Ticket.

Thanks i will report back here.

Kind regards,
Jerry
Last edited by legajer on 06 Oct 2016, 11:50, edited 1 time in total.
root
Administrator
Posts: 4253
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: How to set Template choice to required

Post by root »

reneeb wrote:@root: No that is a standard feature
@reneeb: I've searched in the wrong module - would be better for me to read the details ;-)
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 ?
legajer
Znuny newbie
Posts: 27
Joined: 06 Jul 2016, 10:56
Znuny Version: OTRS 5.0.13
Real Name: Jerry

Re: How to set Template choice to required

Post by legajer »

Hello,

had to do a little search first.
I found AgentTicketEmail.tt in Kernel/Output/HTML/Templates/Standard

In fact only the first line had to be altered of that piece of the script.
So thank you for this.
It is working :)

Up to the next step.

Kind regards,
Jerry
Locked