Consider this just an expanded writeup for future reference. The goal I was going for was to create custom links in the AgentTicketZoom which display the customer's IP and hostname and url's containing these variables for agents to pull up pages on an external server.
Review the CGI Environment variables enumerated here: http://www.cgi101.com/book/ch3/text.html
Take note of the following since they would be the most useful for this purpose:
-REMOTE_ADDR The IP address of the visitor
-REMOTE_HOST The hostname of the visitor
-REMOTE_USER The visitor's username
edit /Kernel/Output/HTML/Standard/CustomerTicketMessage.dtl and add the following somewhere near the end:
Code: Select all
<script type="text/javascript">
document.getElementById('TicketFreeText1').style.display = 'none';
document.getElementById('LabelTicketFreeText1').style.display = 'none';
document.getElementById('TicketFreeText1').value = "$Env{"REMOTE_ADDR"}";
document.getElementById('TicketFreeText2').style.display = 'none';
document.getElementById('LabelTicketFreeText2').style.display = 'none';
document.getElementById('TicketFreeText2').value = "$Env{"REMOTE_HOST"}";
</script>
Add the following to /etc/apache2/conf.d/otrs.conf only if you need/want hostname lookups and also understand that this may cause a performance degradation if dns lookups are not extremely fast on your network.
Code: Select all
hostnameLookups On
Sysconfig:
note: What follows assumes that you currently have a default configuration with all TicketFreeKey* and TicketFreeText* turned off in sysconfig.
Edit Config Settings in Ticket -> Core::TicketFreeText
-Enable TicketFreeKey1
-Enter "IP Address" or something equally descriptive for the Key and erase the content to make it blank
-For my purposes I chose to also enable TicketFreeText1::Link but this is optional
-For the URL: "http://externalservername/default.aspx? ... tFreeText1"}" which links the IP address shown in the interface to pages on our external inventory server.
-Enable TicketFreeKey2
-Enter "Hostname" or something equally descriptive for the Key and erase the content to make it blank
-For my purposes I chose to also enable TicketFreeText2::Link but this is optional
-For the URL: "http://externalservername/default.aspx? ... tFreeText2"}" which links the hostname shown in the interface to pages on our external inventory server.
-Update
Edit Config Settings in Ticket -> Frontend::Customer::Ticket::ViewNew
-In Ticket::Frontend::CustomerTicketMessage###TicketFreeText for Key "1" and Key "2" change the Content "0" to "1"
-Update
Edit Config Settings in Ticket -> Frontend::Agent::Ticket::ViewFreeText
-In Ticket::Frontend::AgentTicketFreeText###TicketFreeText for Key "1" and Key "2" change the Content "0" to "1"
-Update
Now for newly created tickets, you should see something like the following in AgentTicketZoom!
Troubleshooting tip:
View the source from the customer interface CustomerTicketMessage (New Ticket Creation) to find out if the variables are being correctly set. Divide and eliminate problems from there.