[rt-devel] Fix of wrong displaying of Date Changes

Jesse Vincent jesse at bestpractical.com
Wed Mar 6 13:19:32 EST 2002


Thanks. Applied.


On Wed, Mar 06, 2002 at 04:37:47PM +0100, Jan Okrouhly wrote:
> Hi,
> 
> my colleague realized, that info in Dates box differs from info in the
> Ticket History (they weren't displayed in localtime). Here is the fix.
> The problem also appeared in the Results box just after Submitting the
> change.
> 
> --- Transaction.pm.orig Wed Mar  6 16:26:51 2002
> +++ Transaction.pm      Wed Mar  6 16:31:09 2002
> @@ -644,6 +644,15 @@
>             return ($self->Field . " changed from " . $q1->Name . " to ".
>                     $q2->Name);
>         }
> +        # Write the date/time change at local time:
> +        elsif ($self->Field =~  /Due|Starts|Started|Told/) {
> +            my $t1 = new RT::Date($self->CurrentUser);
> +            $t1->Set(Format => 'ISO', Value => $self->NewValue);
> +            my $t2 = new RT::Date($self->CurrentUser);
> +            $t2->Set(Format => 'ISO', Value => $self->OldValue);
> +            return ($self->Field . " changed from " . $t2->AsString .
> +                    " to ".$t1->AsString);
> +        }
>         else {
>             return ($self->Field . " changed from " . $self->OldValue .
>                     " to ".$self->NewValue);
> --- cut here ;-) ---
> 
> Jan Okrouhly
> ---------------------------------------\-\-\+\-\-\---okrouhly at civ.zcu.cz---
> Laboratory for Computer Science             |    phone: (420 19) 7491588
> University of West Bohemia                  | location: Univerzitni 22
> Americka 42, 306 14 Pilsen, Czech Republic  |     room: UI404
> ------------------------------------------73!-de-OK1INC at OK0PPL.#BOH.CZE.EU-
> 
> 
> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel
> 

-- 
http://www.bestpractical.com/products/rt  -- Trouble Ticketing. Free.




More information about the Rt-devel mailing list