Skip Menu |

This queue is for tickets about the RT-Client-REST CPAN distribution.

Report information
The Basics
Id: 38591
Status: resolved
Priority: 0/
Queue: RT-Client-REST

People
Owner: jpierce [...] cpan.org
Requestors: davidjonesuk [...] hotmail.com
jpierce [...] cpan.org
Cc: DMITRI [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Module sems to set funky headers that cause scrip errors
I've been using RT::Client::REST to pass information form a pretty front-end form into RT, but I just noticed a few problems that I've been unable to figure out. I'm writing both rt-users, and the module author because it's not clear where the problem lies... * Tickets created with the REST client have a From: set to the address of the user the that the script is connecting as, whereas tickets created from the web interface have no From: * Even though the requestor field is set properly, none of the standard templates get sent [Tue Aug 19 22:37:04 2008] [info]: <rt-3.8.0-30604-1219185424-1099.22-3-0@cambenergy.org> #22/297 - Scrip 3 On Create Autoreply To Requestors (/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:302) [Tue Aug 19 22:37:04 2008] [info]: <rt-3.8.0-30604-1219185424-1099.22-3-0@cambenergy.org> No recipients found. Not sending. (/opt/rt3/bin/../lib/RT/Interface/Email.pm:337) [Tue Aug 19 22:37:04 2008] [info]: <rt-3.8.0-30604-1219185424-508.22-4-0@cambenergy.org> #22/297 - Scrip 4 On Create Notify AdminCcs (/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:302) [Tue Aug 19 22:37:04 2008] [info]: <rt-3.8.0-30604-1219185424-508.22-4-0@cambenergy.org> No recipients found. Not sending. (/opt/rt3/bin/../lib/RT/Interface/Email.pm:337) [Tue Aug 19 22:37:05 2008] [info]: Ticket 22 created in queue 'Homes' by REST (/opt/rt3/bin/../lib/RT/Ticket_Overlay.pm:659)
Actually, the Scrip 4 error is normal, as there are no queue watchers right now. Also, this is RT 3.8
I just tested the rt CLI and this is definitely a problem with the module.
It seems this module is setting the requestor incorrectly, and so the creating user is set as "From:" My estimation the module is doing things incorrectly is that #38641 does not occur if the user has ModifyTicket rights (which are not obviously needed if one is creating a ticket).
On Thu Aug 21 13:22:36 2008, JPIERCE wrote: Show quoted text
> It seems this module is setting the requestor incorrectly, and so the > creating user is set as "From:" My estimation the module is doing things > incorrectly is that #38641 does not occur if the user has ModifyTicket > rights (which are not obviously needed if one is creating a ticket).
Also, tickets created with the web interface never have the separate system message about setting the requestor in the history e.g; Tue Aug 19 18:44:52 2008 REST - Requestor jpierce@cambenergy.org added
Subject: SOLUTION: Module sems to set funky headers that cause scrip errors
After tracing the structures rt and the module send to REST, I discovered that rt uses the header Requestor: whereas the module is using requestors: Changing Ticket.pm to use the singular results in proper ticket creation.
On Thu Aug 28 23:27:25 2008, JPIERCE wrote: Show quoted text
> After tracing the structures rt and the module send to REST, > I discovered that rt uses the header Requestor: whereas the > module is using requestors: Changing Ticket.pm to use the > singular results in proper ticket creation.
This is interesting: does the same hold true for rt 3.6.x?
Subject: [patch] Allow a Requestor to be added at Ticket creation
Date: Wed, 4 Mar 2009 18:04:44 +0000
To: <bug-rt-client-rest [...] rt.cpan.org>
From: David Jones <davidjonesuk [...] hotmail.com>

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Hi, I found a bug which stopped me from assigning a 'Requestor' during Ticket creation. $ticket->requestors( [qw/foo bar/] ); created the ticket and added the Requestors after creation, so they missed the opening e-mail. I have attached a small patch, and a modified Ticket.pm, which solve this. Show quoted text
__________________________ Errors have occurred. We won't tell you where or why. Lazy programmers.
_________________________________________________________________ All your Twitter and other social updates in one place http://clk.atdmt.com/UKM/go/137984870/direct/01/
On Wed Mar 04 13:05:41 2009, davidjonesuk@hotmail.com wrote: Show quoted text
> > Hi, > > I found a bug which stopped me from assigning a 'Requestor' during > Ticket creation. $ticket->requestors( [qw/foo bar/] ); created the > ticket and added the Requestors after creation, so they missed the > opening e-mail.
Actually, the correct fix (pending, not many spare tuits) is to change the existing requestors line to requestor, to match RT.
Hmm. It seems RT wants singular requestor for ticket creation, but gives the plural in REST response forms; even as far back as 3.4.5, based on a quick examination of html/REST/1.0/Forms/ticket/default This complicates things given rest2attr... but I suppose the simplest thing to do is to give Ticket objects both requestor and requestors attribs, then document that one is for reading and the other for writing.
Hello, We've released a new version of RT::Client::REST to CPAN wich should have the issue you reported fixed. Please come back to us if you feel this issue is not solved correctly. You can find the new version at http://search.cpan.org/~jlmartin/RT-Client-REST-0.4/ Thanks, Jose Luis Martinez RT::Client::REST Co-MAINT