[Rt-devel] patches for Update.html

Kevin Falcone falcone at bestpractical.com
Fri Dec 17 11:57:03 EST 2010


On Fri, Dec 17, 2010 at 05:53:15PM +0100, Christian Loos wrote:
> Hi,
> 
> attached are two patches for Update.html against 3.9-trunk.

The first of these is actually something I'm running tests against now
(there is a bug in issues.bestpractical.com from when I noticed this)


> -if ($DefaultStatus eq 'new'){
> -    $DefaultStatus='open';
> -}
> -

We should have a look at this.

> From c771e4a3448e2cdc42b2ef3eab4dd945c97de312 Mon Sep 17 00:00:00 2001
> From: Christian Loos <cloos at netcologne.de>
> Date: Fri, 17 Dec 2010 17:43:48 +0100
> Subject: [PATCH 2/2] make the title more descriptive
> 
> This also fixes the wrong title 'Resolve ticket ...' if you comment
> or reply on an resolved ticket.
> ---
>  share/html/Ticket/Update.html |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
> index e8f05bf..958f8ff 100755
> --- a/share/html/Ticket/Update.html
> +++ b/share/html/Ticket/Update.html
> @@ -215,11 +215,13 @@ unless($DefaultStatus){
>      $DefaultStatus=($ARGS{'Status'} ||$TicketObj->Status());
>  }
>  
> -if ($DefaultStatus eq 'resolved') {
> -    $title = loc("Resolve ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject);
> -} else {
> -    $title = loc("Update ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject);
> -}
> +my $title_prefix = $DefaultStatus eq 'resolved' && $TicketObj->Status ne 'resolved' ? loc('Resolve ticket')    :
> +                   $DefaultStatus eq 'rejected' && $TicketObj->Status ne 'rejected' ? loc('Reject ticket')     :
> +                   $DefaultStatus eq 'open' && $TicketObj->Status ne 'open'         ? loc('Open ticket')       :
> +                   lc $ARGS{'Action'} eq 'respond'                                  ? loc('Reply to ticket')   :
> +                   lc $ARGS{'Action'} eq 'comment'                                  ? loc('Comment on ticket') :
> +                                                                                      loc('Update ticket')     ;
> +$title = $title_prefix . ' #' . $TicketObj->id . '(' . $TicketObj->Subject . ')';
>  
>  # Things needed in the template - we'll do the processing here, just
>  # for the convenience:
> -- 
> 1.7.1
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20101217/7142b313/attachment-0001.pgp>


More information about the rt-devel mailing list