[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.6-108-g501c6be

Alex Vandiver alexmv at bestpractical.com
Thu Sep 4 12:58:54 EDT 2014


The branch, 4.2-trunk has been updated
       via  501c6be3568aba53fda7364b907636d06fe6101b (commit)
       via  785fba4c0f49d44e1e368586c1bbdda33af78952 (commit)
      from  e1fbb34a2216fa19639adb49cacd02be4f902065 (commit)

Summary of changes:
 lib/RT/Graph/Tickets.pm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 785fba4c0f49d44e1e368586c1bbdda33af78952
Author: Kadar Attila <atus at mithrandir.hu>
Date:   Tue Jun 24 16:24:24 2014 +0200

    Graphviz depth-first link traversal overzealously skips some links
    
    The link detection algorithm uses a depth-firsth traversal of links;
    unfortunately, this can lead to connections being incorrectly omitted.
    If a too-long pathway is encountered prior to a short one, the "seen"
    check will omit it when it is encountered later.
    
    While switching to breadth-first would resolve this more correctly,
    simply tracking the depth that the link was found at is sufficient.

diff --git a/lib/RT/Graph/Tickets.pm b/lib/RT/Graph/Tickets.pm
index 477a5d0..573d820 100644
--- a/lib/RT/Graph/Tickets.pm
+++ b/lib/RT/Graph/Tickets.pm
@@ -299,9 +299,12 @@ sub TicketLinks {
     }
 
     $args{'Seen'} ||= {};
-    return $args{'Graph'} if $args{'Seen'}{ $args{'Ticket'}->id }++;
-
-    $self->AddTicket( %args );
+    if ( $args{'Seen'}{ $args{'Ticket'}->id } && $args{'Seen'}{ $args{'Ticket'}->id } <= $args{'CurrentDepth'} ) {
+      return $args{'Graph'};
+    } elsif ( ! defined $args{'Seen'}{ $args{'Ticket'}->id } ) {
+      $self->AddTicket( %args );
+    }
+    $args{'Seen'}{ $args{'Ticket'}->id } = $args{'CurrentDepth'};
 
     return $args{'Graph'} if $args{'MaxDepth'} && $args{'CurrentDepth'} >= $args{'MaxDepth'};
 

commit 501c6be3568aba53fda7364b907636d06fe6101b
Merge: e1fbb34 785fba4
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Sep 4 12:20:36 2014 -0400

    Merge branch '4.2/graphviz-link-depth' into 4.2-trunk


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


More information about the rt-commit mailing list