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

Jesse Vincent jesse at bestpractical.com
Tue Jan 4 12:46:41 EST 2005




On Tue, Jan 04, 2005 at 03:21:55PM +0100, Koos van den Hout wrote:
> 
> (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.

Koos,
	What version of RT are you working with?

	Jesse


> 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

> --- 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>

> --- 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 &>




> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Be sure to check out the RT wiki at http://wiki.bestpractical.com

-- 



More information about the rt-users mailing list