Hi,
I have an add-on installed that places a different version of TicketOverviewSmall.pm in otrs/Custom/..., thus overriding the core one.
I'd like to put a modified version of it, but without removing the add-on file. So, in a way, replicate what Custom/ already enabled, for a module inside Custom/ (I hope to make sense here). I just want to leave all original code/files intact.
Any idea for this?
Overriding custom module
-
- Znuny newbie
- Posts: 62
- Joined: 03 Dec 2014, 18:49
- Znuny Version: OTRS 4
- Location: Portugal
- Contact:
Overriding custom module
Linux (Ubuntu 14.04.1 LTS) | MySQL 5.5.40 | OTRS 4.0.7
-
- Znuny expert
- Posts: 213
- Joined: 04 Nov 2012, 23:58
- Znuny Version: OTRS 4.x
- Real Name: Esteban
- Company: NORTON DE COLOMBIA
Re: Overriding custom module
If your addon is already using the "Custom" folder, then there is no way to achieve what you want (as far as i know).
My advice is to make a copy of your "Custom/.../TicketOverviewSmallpm" and rename it to "pm.bk"..after that, edit your "Custom/.../TicketOverviewSmall.pm" file
My advice is to make a copy of your "Custom/.../TicketOverviewSmallpm" and rename it to "pm.bk"..after that, edit your "Custom/.../TicketOverviewSmall.pm" file
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Overriding custom module
But that will trigger a warning in the package manager ("Package not correctly installed") and it will get overwritten when you upgrade / reinstall said package.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
-
- 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: Overriding custom module
Go the "KIX" way
Create a MyCustom directory in the same level as Custom. And add "use lib '/path/to/MyCustom';" to your Kernel/Config.pm. Then you can place your own modules in the MyCustom directory (you have to use the same structure Kernel/Output/... as in Custom/).
Create a MyCustom directory in the same level as Custom. And add "use lib '/path/to/MyCustom';" to your Kernel/Config.pm. Then you can place your own modules in the MyCustom directory (you have to use the same structure Kernel/Output/... as in Custom/).
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
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Znuny newbie
- Posts: 62
- Joined: 03 Dec 2014, 18:49
- Znuny Version: OTRS 4
- Location: Portugal
- Contact:
Re: Overriding custom module
a beer for this gentleman!reneeb wrote:Go the "KIX" way
Create a MyCustom directory in the same level as Custom. And add "use lib '/path/to/MyCustom';" to your Kernel/Config.pm. Then you can place your own modules in the MyCustom directory (you have to use the same structure Kernel/Output/... as in Custom/).
thank you all.
Linux (Ubuntu 14.04.1 LTS) | MySQL 5.5.40 | OTRS 4.0.7
-
- Znuny newbie
- Posts: 62
- Joined: 03 Dec 2014, 18:49
- Znuny Version: OTRS 4
- Location: Portugal
- Contact:
Re: Overriding custom module
Hello,
I've been using the method suggested by @reneeb, and it's been working wonderfully on my OTRS4 installation.
But now I'm testing OTRS5, and I'm noticing something very very odd..
For example, I have modified versions of these two files, AgentTicketStatusView.pm and AgentTicketResponsibleView.pm, where I enable additional ticket filters to show on the views menu bar.
What's happening with OTRS5, is that sometimes they load with the additional filters, some other times they just load the original modules without the additional filters. And there are no error logs. It's very strange.
Any suggestion anyone?
Thanks in advance.
I've been using the method suggested by @reneeb, and it's been working wonderfully on my OTRS4 installation.
But now I'm testing OTRS5, and I'm noticing something very very odd..
For example, I have modified versions of these two files, AgentTicketStatusView.pm and AgentTicketResponsibleView.pm, where I enable additional ticket filters to show on the views menu bar.
What's happening with OTRS5, is that sometimes they load with the additional filters, some other times they just load the original modules without the additional filters. And there are no error logs. It's very strange.
Any suggestion anyone?
Thanks in advance.
Linux (Ubuntu 14.04.1 LTS) | MySQL 5.5.40 | OTRS 4.0.7
-
- Znuny newbie
- Posts: 62
- Joined: 03 Dec 2014, 18:49
- Znuny Version: OTRS 4
- Location: Portugal
- Contact:
Re: Overriding custom module
Nevermind, forgot to add the custom path to apache2-perl-startup.pl, seems stable now
Linux (Ubuntu 14.04.1 LTS) | MySQL 5.5.40 | OTRS 4.0.7