OTRS – Completely hide “disabled” Services

OTRS — Jeff Eske on April 25, 2012 at 3:26 pm

In OTRS 3.1 and newer, evidently Services that are disabled via ACLs are now only greyed out.  For our users, it’s less confusing to make them disappear completely.  In order to accomplish this, I had to actually go into a couple of files and add some code.  See the description below.
Files Modified:
/opt/otrs/Kernel/Modules/AgentTicketEmail.pm
/opt/otrs/Kernel/Modules/AgentTicketPhone.pm

Modifications:
You need to add an else statement (the push part exists without the else part)down around:
AgentTicketEmail.pm – line 1950-1955.
AgentTicketPhone.pm – line 1875-1885.

[CODE:]
# check if service is disabled
if ( !$Service{$ServiceKey} ) {
$ServiceRegister{Disabled} = 1;
}
##### Else Brackets Added by Jeff #####
 else{
push @ServiceList, \%ServiceRegister;
}
# set service as printed
$AddedServices{$ServiceKey} = 1;

[/CODE:]

Jeff

3 Comments

  1. Excellent. Thanks so much for this.

    I achieved the same thing in the customer portal by editing “CustomerTicketMessage.pm”

    Comment by Matt Smith — May 1, 2012 @ 5:38 am
  2. Hello Jeff,

    I do Thank you for your Great Blog about OTRS, It has Helped me allot with My Issues.

    This System was Dumped on my Table and i need to manager and maintain it.

    I’m having some issues with the Hid/show of Dynamic Fields for Queues, I do hope you can help me with this, I do not have any Programming Background, so most of it makes no sense to me.
    Should i post my issues here or can we Email with each other? so that your blog will not fill up with unnecessary Info.

    Regards,
    Heiko

    Comment by Heiko — April 8, 2014 @ 4:24 am
  3. Hello Heiko,

    I’m sorry, but I’ve changed jobs and don’t work with OTRS anymore, so I can’t really help you. I would recommend that you look into the OTRS forums at: http://forums.otterhub.org/. They were very helpful for me.

    Good luck.

    Jeff

    Comment by Jeff Eske — April 8, 2014 @ 1:53 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Jeff's Blog