JSGantt fails when there are external deps

Hi, not sure if this is the right place, but when there are external
links on a ticket, trying to generate a gantt chart fails.

I’ve attached a patch that simply ignores external links.

Cheers, Jeff.

Jeff Fearn jfearn@redhat.com
Software Engineer
Engineering Operations
Red Hat, Inc
Freedom … courage … Commitment … ACCOUNTABILITY

external-fix.patch (755 Bytes)

thanks, applied in repository.On 10-09-23 10:33, Jeffrey Fearn wrote:

Hi, not sure if this is the right place, but when there are external
links on a ticket, trying to generate a gantt chart fails.

I’ve attached a patch that simply ignores external links.

Cheers, Jeff.


Jeff Fearn jfearn@redhat.com
Software Engineer
Engineering Operations
Red Hat, Inc
Freedom … courage … Commitment … ACCOUNTABILITY

— bestpractical-rt-extension-jsgantt-96fb60d/lib/RT/Extension/JSGantt.pm 2010-09-23 09:52:38.000000000 +1000
+++ patched/lib/RT/Extension/JSGantt.pm 2010-09-23 09:54:31.000000000 +1000
@@ -61,6 +61,8 @@

     my $parent = 0;
     if ( $Ticket->MemberOf->Count ) {
  •        # BUGBUG external links go boom
    
  •        next unless($Ticket->MemberOf->First->TargetObj);
           $parent = $Ticket->MemberOf->First->TargetObj->id;
       }
    

@@ -132,6 +134,8 @@
my @depends;
if ( $depends->Count ) {
while ( my $d = $depends->Next ) {

  •            # BUGBUG external links go boom
    
  •            next unless($d->TargetObj);
               push @depends, $d->TargetObj->id;
           }
       }
    

List info: The rt-devel Archives