remove Customer Information from print view

Moderator: crythias

Locked
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

remove Customer Information from print view

Post by Gunjan »

Hi,

I am using otrs 3.3.4 and my problem is - When I print a ticket, There is customer information present in the print page. I want to remove that information. I only want to have ticket information on printed output. Please help me.

Regards,
Gunjan
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: remove Customer Information from print view

Post by reneeb »

As you ask a lot of development related stuff (and you seem to be a customer), I recommend that you look for an OTRS developer training. This would save you a lot of time in the end. Then you would be able to answer your questions within minutes ;-)

WRT your question: Have a look at Kernel/Modules/AgentTicketPrint.pm . There you'll find a comment like

Code: Select all

# output customer infos
comment the following block...

How did I come to that solution:

1) See what URL is called when a ticket is printed: http://localhost/otrs/index.pl?Action=AgentTicketPrint
2) See what Action is in that URL ( => AgentTicketPrint)
3) Those Actions are mapped to modules in Kernel/Modules/ -> open Kernel/Modules/AgentTicketPrint.pm
4) Search for anything related to the customer
5) found the above mentioned comment
6) seen that a method is called
7) Have a look at that method, noticed that no config options is requested, so the customer data are always printed. No way to turn it off via SysConfig
8) Conclusion: comment the call of that method.
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
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: remove Customer Information from print view

Post by Gunjan »

Actually I also tried the same and it did not work. I ask the questions to confirm my solution and found that what I was doing, was right. Now I don't understand why this is not working!
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: remove Customer Information from print view

Post by reneeb »

When I do it, it works... It would have been nice if you had written what you already have tried. And "it doesn't work" is no proper error message. Are there any log messages?

Was the module reloaded after you made the change? You meant the table "Customer information" on the PDF, didn't you? (Not the customer id in the table with general ticket information)

Can you post a screenshot of the PDF and highlight the things you don't want to print? Can you post the code of the (modified) module? Are you sure you edited the right file (is there a Custom/Kernel/Modules/AgentTicketPrint.pm)?
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
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: remove Customer Information from print view

Post by Gunjan »

Hi,

I commented the code in AgentTicketPrint.pm and attached photo is that part of PDF, that I don't want to print.
customer.png
You do not have the required permissions to view the files attached to this post.
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: remove Customer Information from print view

Post by reneeb »

You didn't answer my other questions...
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
Locked