Default ticket type for new tickets

Moderator: crythias

Post Reply
jeffg
Znuny newbie
Posts: 15
Joined: 08 Aug 2017, 13:57
Znuny Version: OTRS 5

Default ticket type for new tickets

Post by jeffg »

Hi,
not sure wether this is the correct section, if not, please move it.

Is there a possibility to give new tickets a default ticket type?
Neither Frontend::Agent::Ticket::ViewEmailNew
not Frontend::Agent::Ticket::ViewPhoneNew
seem to have that option.

There it has been mentioned but closed: https://otrsteam.ideascale.com/a/idea-v2/332943

Appreciating every answer :D
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Default ticket type for new tickets

Post by RStraub »

Hey there,

you can do that via URL parameters. Go to the SysConfig (Ticket -> Agent::ModuleRegistration) and edit the link for Phone/Email tickets. Add this string:

Code: Select all

;Subaction=StoreNew;ExpandCustomerName=2;TypeID=3
(and replace the last number with the type you want to see)
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
jeffg
Znuny newbie
Posts: 15
Joined: 08 Aug 2017, 13:57
Znuny Version: OTRS 5

Re: Default ticket type for new tickets

Post by jeffg »

Hey RStraub,

thanks for you quick reply.

I never used those URL params here in OTRS. Where exactly do they have to go?

Frontend::Module###AgentTicketPhone (/Email) -> Navbar -> Group ro -> LinkOption?

Because that doesn't work for me. And I see a "Type" option there as well, but that is not working too.
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Default ticket type for new tickets

Post by RStraub »

Hey,

not the LinkOption, just the Link. So instead of:

Code: Select all

Action=AgentTicketPhone
you'll use:

Code: Select all

Action=AgentTicketPhone;Subaction=StoreNew;ExpandCustomerName=2;TypeID=3
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
jeffg
Znuny newbie
Posts: 15
Joined: 08 Aug 2017, 13:57
Znuny Version: OTRS 5

Re: Default ticket type for new tickets

Post by jeffg »

Wow. Works perfectly fine. Thank you very much.

Now from pure interest: Why doesn't it work without the other two params?
jeffg
Znuny newbie
Posts: 15
Joined: 08 Aug 2017, 13:57
Znuny Version: OTRS 5

Re: Default ticket type for new tickets

Post by jeffg »

I wish that would have been it, but OTRS has an icon on the upper left. For "Tickets->New E-Mail Tickets" it works, but not for that icon. That once still refers to "Action=AgentTicketPhone" with no more params...
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Default ticket type for new tickets

Post by RStraub »

That's probably one of these settings:
Ticket → Frontend::Agent::ToolBarModule

I don't know *exactly* what the other two parameters do, but a guess is:
- OTRS only parses URL parameters when in subaction "StoreNew" (which might be AJAX updates, Splits and alike)
- WIthout the "ExpandCustomerUser" there is validation on the fields. And since the fields are empty at default that would result in an error popup.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
jeffg
Znuny newbie
Posts: 15
Joined: 08 Aug 2017, 13:57
Znuny Version: OTRS 5

Re: Default ticket type for new tickets

Post by jeffg »

I searched for Toolbar but couldn't find it. Anyway. Thank you very very much. Everything sorted now :D

Can be closed :)
jeffg
Znuny newbie
Posts: 15
Joined: 08 Aug 2017, 13:57
Znuny Version: OTRS 5

Re: Default ticket type for new tickets

Post by jeffg »

Actually. There is one more thing.

After I create tickets the params get changed to "Action=AgentTicketPhone;Subaction=Created;TicketID=XXXXX". Where can I set my other params to be included here as well?
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Default ticket type for new tickets

Post by RStraub »

Isn't the created view just a TicketZoom? What / Why / Which parameters would you expect here ?
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
jeffg
Znuny newbie
Posts: 15
Joined: 08 Aug 2017, 13:57
Znuny Version: OTRS 5

Re: Default ticket type for new tickets

Post by jeffg »

No. After I create a ticket I get Create Screen again, to create the next one. This is very handy but now my parameters that we set up above are not set anymore
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: Default ticket type for new tickets

Post by reneeb »

That needs some code changes...
In https://github.com/OTRS/otrs/blob/rel-5 ... e.pm#L1662 the redirect URL is built. You need to add your parameters here...
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
jeffg
Znuny newbie
Posts: 15
Joined: 08 Aug 2017, 13:57
Znuny Version: OTRS 5

Re: Default ticket type for new tickets

Post by jeffg »

Is that the only possibility?

Because I do not want to edit the code of OTRS itself.
Post Reply