How to prevent the Requestor field from autopopulating with an email address


#1

We do not currently use the email feature of RT. However, when you start a new ticket, the Requestor field automatically fills with the requestor’s email address.

How do I turn that feature off without turning off the entire emailing function of RT? I would like to keep the RT email feature active so I can eventually have RT send out reminder emails for overdue tickets, etc.

As an admin, I disabled the “On Create Autoreply to Requestors” scrip, but that did not work.


#2

After rebooting the server, it has stopped filling out that field automatically.


#3

And now it is doing it again.


#4

Disabling the autoreply scrip won’t effect this behavior, and if you plan to use email in the future you may want to leave it enabled. You will need to use a callback in order to remove the default value being set for the ‘Requestors’ input on ticket create.

If you look at Create.html you can see that the default value for that input is set to:

Default => $ARGS{Requestors} // $session{CurrentUser}->EmailAddress

and right before this is called you have the following callback available that passes a reference to the ARGS hash:

% $m->callback(CallbackName => 'BeforeRequestors', QueueObj => $QueueObj, ARGSRef => \%ARGS);

So you can use ‘local/html/Callbacks/MyRT/Ticket/Create.html/BeforeRequestors’ and just set the Requestors value to '':

<%INIT>
$ARGSRef->{Requestors} = '';
</%INIT>
<%ARGS>
$ARGSRef
</%ARGS>

https://docs.bestpractical.com/rt/4.4.4/writing_extensions.html#Callbacks