Hi. I use REST API for RT 4.4.2 to create new tickets that is successful, however, when I look at the history of the ticket I notice that no matter what username/password and no matter what email I use for Requestor, “From” is always set with user root details (or superuser).
I want the see Requestor’s email in ticket history in front of “From:”, that is possible if I create the ticket via email but not via REST API.
If you are using the root users credentials it makes sense that they are the creator of the ticket. Since the REST interface doesn’t use the email interface (It calls RT::Ticket->Create directly) the create process doesn’t check any header like ‘From’. Testing very quick I see that adding “Requestor” to a REST create call does set the requestor on the ticket though.
Maybe you could have a scrip set the creator to the requestor on ticket create for REST tickets? I am not sure if that creator is mutable or not though.
Thanks for your quick response. I tested it with non-root users credentials and the result is the same. I also set the Requestor without any effect besides setting the Requestor.
I also decided to give the user right to be the owner of the tickets, and set Owner on API call but no change again unless it set the Creator.
I’m wondering how the API chooses the root user for setting “From” email address. I also looked at all the scripts but none of them doing something related to this issue.
Thanks for your quick response. I tested it with non-root users credentials and the result is the same
I just tested with another user and basic auth and I see their name reflected as the creator of the ticket.
set the Requestor without any effect besides setting the Requestor.
This means the requestor is set? That is the right result right?
I’m wondering how the API chooses the root user for setting “From” email address. I also looked at all the scripts but none of them doing something related to this issue.
It is not checking the From address, if you look at the sub Create method for Ticket.pm that is what is being called by the API.