[Rt-commit] rt branch, 4.4/numeric-eq-warning-in-circular-links-check, created. rt-4.2.12-505-g5e5e70e
? sunnavy
sunnavy at bestpractical.com
Wed Nov 4 14:29:32 EST 2015
The branch, 4.4/numeric-eq-warning-in-circular-links-check has been created
at 5e5e70eefc63214ea89f814bf6215dee067d81af (commit)
- Log -----------------------------------------------------------------
commit 5e5e70eefc63214ea89f814bf6215dee067d81af
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Nov 5 02:03:30 2015 +0800
use eq instead because link values could contain non-numeric chars
besides tickets, we have article, asset and even external tickets.
Fixes: I#31399
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index ae0262d..40e8d8e 100644
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -1412,7 +1412,7 @@ sub _AddLink {
LinkType => $args{'Type'},
Direction => $direction eq 'Target' ? 'Base' : 'Target',
);
- if ( grep { $_->id == ( $direction eq 'Target' ? $args{'Base'} : $args{'Target'} ) } @tickets ) {
+ if ( grep { $_->id eq ( $direction eq 'Target' ? $args{'Base'} : $args{'Target'} ) } @tickets ) {
return ( 0, $self->loc("Refused to add link which would create a circular relationship") );
}
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list