Hello
On ticket Creation, when the submit button is clicked on the "New Ticket" screen, is it possible to add/append the value of a Dynamic Field to the message body?
Thank you
Add Dynamic field value to message body
Moderator: crythias
-
- Znuny newbie
- Posts: 24
- Joined: 23 Jun 2016, 15:49
- Znuny Version: 4.0.1
-
- 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: Add Dynamic field value to message body
Only with development. Do you know JavaScript?
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: 24
- Joined: 23 Jun 2016, 15:49
- Znuny Version: 4.0.1
Re: Add Dynamic field value to message body
Yes I do. Although I thought it would be possible on the backend using an event module or something similar.
-
- Znuny newbie
- Posts: 27
- Joined: 06 Jul 2016, 10:56
- Znuny Version: OTRS 5.0.13
- Real Name: Jerry
Re: Add Dynamic field value to message body
Hi,
we need this too.
Our system is so that only an Agent can create a new Email Ticket, not customers.
So the system is merely used internal, but the customer gets an email when the ticket is created.
At New Email Ticket i've added some Dynamic Fields which are also viewable in the overviews.
With an Outbound Email the Dynamic fields you want are being filled correctly with the data you previously entered at creating the new ticket, when these are added to the Templates for Outbound Email.
I copied the same lines which call the Dynamic Fields to the Template for New Tickets. But then the values are not being shown in the customer received email.
It would be very convenient to have these Dynamic Fields in the New Email Ticket which the customer receives at first.
Is there an easy solution for this?
Is this only to be done via programming?
If so are there any examples and which file should be altered?
Thanks very much !
we need this too.
Our system is so that only an Agent can create a new Email Ticket, not customers.
So the system is merely used internal, but the customer gets an email when the ticket is created.
At New Email Ticket i've added some Dynamic Fields which are also viewable in the overviews.
With an Outbound Email the Dynamic fields you want are being filled correctly with the data you previously entered at creating the new ticket, when these are added to the Templates for Outbound Email.
I copied the same lines which call the Dynamic Fields to the Template for New Tickets. But then the values are not being shown in the customer received email.
It would be very convenient to have these Dynamic Fields in the New Email Ticket which the customer receives at first.
Is there an easy solution for this?
Is this only to be done via programming?
If so are there any examples and which file should be altered?
Thanks very much !
-
- Znuny newbie
- Posts: 27
- Joined: 06 Jul 2016, 10:56
- Znuny Version: OTRS 5.0.13
- Real Name: Jerry
Re: Add Dynamic field value to message body
Anybody an idea?
Why is this not a standard feature, to me this looks like an important and much wanted issue.
Thanks for any help on this.
Why is this not a standard feature, to me this looks like an important and much wanted issue.
Thanks for any help on this.
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Add Dynamic field value to message body
This is some javascript we use to prepend the body with the type, the service and the priority:
Modify it to your needs and put it in any WRAPPER JSOnDocumentComplete block.
The fields for dynamicfields probably are named "DynamicField_$FIELDNAME".
Code: Select all
$('#submitRichText').bind('click', function () {
var OldText = window.CKEDITOR.instances.RichText.getData();
var NewText = "------------------------------------<br>" +
"Typ: " + $('#TypeID').find('option:selected').text() + "<br>" +
"Service: " + $('#ServiceID').find('option:selected').text() + "<br>" +
"Priorität: " + $('#PriorityID').find('option:selected').text() + "<br>" +
"------------------------------------<br><br><br>" + OldText;
window.CKEDITOR.instances.RichText.setData(NewText);
});
The fields for dynamicfields probably are named "DynamicField_$FIELDNAME".
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
-
- Znuny newbie
- Posts: 27
- Joined: 06 Jul 2016, 10:56
- Znuny Version: OTRS 5.0.13
- Real Name: Jerry
Re: Add Dynamic field value to message body
Thank you for your example.
And sorry for my late reply.
So the Type, Prioritat and Service are your Dynamic fields?
Ok i have to examine how to create a wrapper for this, as i do not have any experience in JavaScript.
Only LiveCode.
i can find files with Putty, but i don't have any other access to the server.
So i can make a backup of any file that should be altered and i can modify or create a new file.
But i have to call our IT to restart the system i guess before it probably will work. (but they also do not know JavaScript)
So thank you vey much.
And if you have more tips for me on how to and where to insert then please help me with this.
Thanks !
And sorry for my late reply.
So the Type, Prioritat and Service are your Dynamic fields?
Ok i have to examine how to create a wrapper for this, as i do not have any experience in JavaScript.
Only LiveCode.
i can find files with Putty, but i don't have any other access to the server.
So i can make a backup of any file that should be altered and i can modify or create a new file.
But i have to call our IT to restart the system i guess before it probably will work. (but they also do not know JavaScript)
So thank you vey much.
And if you have more tips for me on how to and where to insert then please help me with this.
Thanks !