Page 1 of 1

Auto-populate Logged-in User's Name & Email for Internal tickets

Posted: Fri Sep 29, 2017 11:17 pm
by Lisaweb
Version of script: 2.7.3
What terms did you try when SEARCHING for a solution: internal ticket

We LOVE HESK!!! We use it as an entirely internal system used to process orders, and now no one drops the ball on a sale! Each Sales Rep has their own category, and when they make a sale they open a new ticket internally and assign it to customer service for processing.

Because of this, they would LOVE it if we could add code that would simply populate the name & email of the logged in user into the corresponding "New Ticket" issuer fields. (In an editable box which could be overrided if need be). Many thanks for any assistance on this! :-)

Re: Auto-populate Logged-in User's Name & Email for Internal tickets

Posted: Sat Sep 30, 2017 6:12 am
by Klemen
This should be relatively easy, because the new_ticket.php file accepts arguments in the URL; you just need to modify the link.

Open admin/admin_main.php and change

Code: Select all

<a href="new_ticket.php">
to

Code: Select all

<a href="new_ticket.php?name='.urlencode($_SESSION['name']).'&amp;email='.urlencode($_SESSION['email']).'">
That should do the trick.