[SOLVED] Show queue comment in ticket creation

Moderator: crythias

Post Reply
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

[SOLVED] Show queue comment in ticket creation

Post by HervE »

Hello forum,

Do you think it could be possible to display the comment of the queue during ticket creation?
Whatever the way: balloon help over the listbox, or label text on the right of the listbox (once the queue is selected), or another way... The easier, the better.

I had a quick look at CustomerTicketMessage.dtl and .pm, but soon struggled with AJAX things (which I don't know at all).

Regards,
HervE
Last edited by HervE on 16 Dec 2014, 17:24, edited 1 time in total.
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
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: Show queue comment in ticket creation

Post by reneeb »

It's possible, but it requires some development. I've done something similar for a customer. We have added a new JavaScript file that triggers an AJAX request when the create mask is opened. That requests a new action that just gets the queue information as JSON (something like '{"queue1":"comment1", "queue2":"comment2"}') and store it in a variable (e.g. QueueComments). And an additional bind on the queue dropdown is made that listens on 'change':

Code: Select all

$('#Dest').bind('change', function(){ $(this).parent().append( $('<div>').text( QueueComments[ $(this).val() ] ) ); });
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
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Show queue comment in ticket creation

Post by HervE »

Thanks for your answer.

Looks clever - yet interesting.

Would you tell me more please?

What do I need to put in the new JavaScript file?
Does the additional bind in the .dtl replace the existing one?

Best regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Show queue comment in ticket creation

Post by HervE »

Still interested.
Could you give me more information please?

Best regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
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: Show queue comment in ticket creation

Post by reneeb »

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
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Show queue comment in ticket creation

Post by HervE »

Brilliant Renee!

It works perfectly well for AgentTicketPhone... but I have no change on CustomerTicketMessage unfortunately!? Why?

(By the way, I had to install your v3.3.2 because of OTRS 3.3.8.)

Best Regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
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: Show queue comment in ticket creation

Post by reneeb »

Go to SysConfig Ticket -> Outputfilter and add "CustomerTicketMessage" where "AgentTicketPhone" is...

So you should have three entries at the end:

AgentTicketPhone -> 1
AgentTicketEmail -> 1
CustomerTicketMessage -> 1
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
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Show queue comment in ticket creation

Post by HervE »

Oh yes! I should have known! (Stupid me.)

Now it's all as wanted. Many thanks, you are marvellous!

Best regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
Post Reply