[Bps-public-commit] rt-extension-jsgantt branch, master, updated. 0d7037d01c029fc2ac7879c6976a3f12e8a9fafa

? sunnavy sunnavy at bestpractical.com
Thu Jul 8 09:31:03 EDT 2010


The branch, master has been updated
       via  0d7037d01c029fc2ac7879c6976a3f12e8a9fafa (commit)
       via  5c7bc7d1b047a41fbf23810f55f3ceb49c7a278f (commit)
      from  8062ed16f3bacb563856b08af0a0740744cd2382 (commit)

Summary of changes:
 lib/RT/Extension/JSGantt.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 5c7bc7d1b047a41fbf23810f55f3ceb49c7a278f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 8 21:30:12 2010 +0800

    test $min_start_obj is better

diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index 9b7d990..3abcc64 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -194,7 +194,7 @@ sub TicketsInfo {
 
     #let's tweak our results
     #set to now if all tickets don't have start/end dates
-    if ( !$min_start ) {
+    unless ( $min_start_obj && $min_start_obj->Unix ) {
         $min_start_obj = RT::Date->new( $args{CurrentUser} );
         $min_start_obj->SetToNow;
         my ( $day, $month, $year ) =

commit 0d7037d01c029fc2ac7879c6976a3f12e8a9fafa
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 8 21:31:32 2010 +0800

    limit Unix > 0

diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index 3abcc64..b106a95 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -194,7 +194,7 @@ sub TicketsInfo {
 
     #let's tweak our results
     #set to now if all tickets don't have start/end dates
-    unless ( $min_start_obj && $min_start_obj->Unix ) {
+    unless ( $min_start_obj && $min_start_obj->Unix > 0 ) {
         $min_start_obj = RT::Date->new( $args{CurrentUser} );
         $min_start_obj->SetToNow;
         my ( $day, $month, $year ) =
@@ -245,7 +245,7 @@ sub _GetDate {
     my ( $date_obj, $date );
     for my $field (@fields) {
         my $obj = $field . 'Obj';
-        if ( $ticket->$obj->Unix ) {
+        if ( $ticket->$obj->Unix > 0 ) {
             $date_obj = $ticket->$obj;
             my ( $day, $month, $year ) =
               ( $date_obj->Localtime('user') )[ 3, 4, 5 ];

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list