[rt-users] Q: Multiple Requestors per Ticket?

Paul Hirose phirose at sac.verio.net
Tue Nov 28 20:39:55 EST 2000


Ok, now that I've realized (thanks all) multiple-requestors *is* possible,
I've gone digging through the code to see why it is *NOT* working.  

The upshot (in short), I think is as follows:
          ($serial_num,$transaction_num, $message) = &rt::add_new_request(
                       $in_queue, $area, $current_user,'','', $subject,
                       $rt::queues{"$in_queue"}{'default_final_prio'},
                               $rt::queues{"$in_queue"}{'default_prio'},'open',
                               $rt::time, 0, 0, $content, $current_user,
                       $squelch_replies);
at approximately line 121 in file ui/mail/manipulate.pm in sub activate{}
should probably have, as its 3rd argument $replyto, and not $current_user.

Actually, that's not quite true, it just works for me :)  Details follow:

What I wanted was multiple-requestors, and in-and-of-itself, that's fine
with RT.  A simple comma-separated list is accepted if you enter it in
on the web-page.

The problem came actually because I was generating tickets via Email.
I was using the Reply-To: header and after careful examination, realized
that my sendmail binary was putting a " " in between my list of Reply-To:
addresses.  While my Perl code has "Reply-To: $email1,$email2" sendmail
was "nice" enough to change it to "Reply-To: addr1 at addr1.com, addr2 at addr2.com".
The " " in there breaks things.  

In the file ui/mail/manipulate.pm the following line exists:
    #Get the real name of the current user from the replyto/from/sender/etc
    $name_temp  = $current_user;
    if ($current_user =~/(\S*\@\S*)/) {
        $current_user =$1;
    }
and the matching statement (if ($current_user =~/(\S*\@\S*)/) {) drops
everything after the space.  So at this point, $current_user looks like
"addr1 at addr1.com,"  This is later cleaned up in norm_requestor() function
and eventually is ok to use.

So another quick change that would also make what I want to work would be
to simply add:
	$current_user =~ s/\s*,\s*/,/g;
right below this line:
	$current_user = $replyto || $from || $sender;

Not really the ideal solution, and I haven't checked all the ramifications
of it.  But I know what I'm looking for in ReplyTo and I figure changing
a set of addresses from "a, b" to "a,b" probably won't be too bad.

It'd be ncie if I could use the "SET user XXXXX" command, and I looked
at that, but that's kinda chicken-and-egg.  I can't set the requestor
for a ticket that doesn't yet exist :)

I do look forward to a more elegant solution though, if anyone would
be willing to keep working on it.  For now, this appears to work for me :)

Phew :)  Not as bad as I thought it'd be, just took some time :)

PH
-- 
_____________________________________________________________________
Paul Hirose -- phirose at sac.verio.net		Voice: 916-856-1530
Verio, the new world of business	 	Fax:   916-856-1540




More information about the rt-users mailing list