[rt-users] bug making tickets revert to owner 'nobody'

Koos van den Hout koos at kzdoos.xs4all.nl
Tue Jan 4 09:21:55 EST 2005


(Bcc: to rt-bugs)

I received a complaint that RT was reverting tickets to owner 'nobody' on
replying to a ticket via a certain path.

I dug around and I think I have found the source, a bit of a problem the
way Tickets/Update.html calls Elements/SelectOwner and doesn't set the
default the way SelectOwner likes it which makes the selector revert to
'Nobody' as default (being the first choice).

I made local versions of those two files which seem to fix the problem (I
asked the local users to test it).

I'm not convinced this is the 'clean' or 'right' way to fix this problem,
but it works for us at the moment. It looks like the interface to
Elements/SelectOnwer is in a bit of change, making things confused.

Patches attached.

                                          Koos van den Hout

-- 
Koos van den Hout,           PGP keyid RSA/1024 0xCA845CB5 via keyservers
koos at kzdoos.xs4all.nl        or DSS/1024 0xF0D7C263                        -?)
Fax +31-30-2817051             Camp Wireless, wireless Internet access     /\\
http://idefix.net/~koos/       at campsites http://www.camp-wireless.org/ _\_V
-------------- next part --------------
--- share/html/Elements/SelectOwner	2004-07-29 02:08:11.000000000 +0200
+++ local/html/Elements/SelectOwner	2005-01-04 14:59:35.000000000 +0100
@@ -49,7 +49,9 @@
 %}
 <OPTION <% ($RT::Nobody->Id() == $Default) && "SELECTED" %> VALUE="<%$RT::Nobody->Id%>"><%$RT::Nobody->Name%></OPTION>
 %while ( my $User = $Users->Next())  {
+%       if ($User->Id != $DefaultValue){
 <OPTION <% ($User->Id == $Default)         && "SELECTED" %> VALUE="<%$User->Id()%>"><%$User->Name()%></OPTION>
+%       }
 %}
 </SELECT>
 
@@ -80,6 +82,6 @@
 $Default => undef
 $User => undef
 $TicketObj => undef
-$DefaultValue => 1
+$DefaultValue => undef
 $DefaultLabel => "-"
 </%ARGS>
-------------- next part --------------
--- share/html/Ticket/Update.html	2004-07-29 02:08:11.000000000 +0200
+++ local/html/Ticket/Update.html	2005-01-04 15:04:20.000000000 +0100
@@ -60,7 +60,7 @@
 <td>
 <& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->Status), Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus)&>
 <&|/l&>Owner</&>:  
-<& /Elements/SelectOwner, Name=>"Owner", DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->OwnerObj->Name()), QueueObj => $TicketObj->QueueObj, TicketObj => $TicketObj, Default => $ARGS{'Owner'} &>
+<& /Elements/SelectOwner, Name=>"Owner", DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->OwnerObj->Name()), QueueObj => $TicketObj->QueueObj, TicketObj => $TicketObj, Default => ($ARGS{'Owner'} || $TicketObj->OwnerObj->Id()), DefaultValue => ($ARGS{'Owner'} || $TicketObj->OwnerObj->Id()) &>
 <&|/l&>Worked</&>: <input size=4 name="UpdateTimeWorked" value="<% $ARGS{UpdateTimeWorked}%>"> <&|/l&>minutes</&></td></tr>
 % my $skip;
 <& /Elements/Callback, _CallbackName => 'BeforeUpdateType', skip => \$skip, %ARGS &>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 248 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20050104/f42d4754/attachment.sig>


More information about the rt-users mailing list