[Rt-commit] r14331 - in rt/branches/3.999-DANGEROUS: . lib/RT/Model
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Jul 21 11:20:24 EDT 2008
Author: sunnavy
Date: Mon Jul 21 11:20:23 2008
New Revision: 14331
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm
rt/branches/3.999-DANGEROUS/t/ticket/link_search.t
Log:
r14780 at sunnavys-mb: sunnavy | 2008-07-21 23:12:31 +0800
linked_from => LinkedFrom, and it is just the start, we need to be coherent and more flexible
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm Mon Jul 21 11:20:23 2008
@@ -111,7 +111,7 @@
Linked => ['LINK'],
linked_to => [ 'LINK' => 'To' ],
- linked_from => [ 'LINK' => 'From' ],
+ LinkedFrom => [ 'LINK' => 'From' ],
MemberOf => [ 'LINK' => To => 'MemberOf', ],
DependsOn => [ 'LINK' => To => 'DependsOn', ],
RefersTo => [ 'LINK' => To => 'RefersTo', ],
@@ -366,7 +366,7 @@
$sb->_link_limit( 'linked_to', $op, $value, @rest );
$sb->_link_limit(
- 'linked_from',
+ 'LinkedFrom',
$op, $value, @rest,
entry_aggregator => (
( $is_negative && $is_null ) || ( !$is_null && !$is_negative )
Modified: rt/branches/3.999-DANGEROUS/t/ticket/link_search.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/link_search.t (original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/link_search.t Mon Jul 21 11:20:23 2008
@@ -176,7 +176,7 @@
is($Collection->first->id, $grand_childid, "We found all tickets linked to ticket #$childid");
$Collection = RT::Model::TicketCollection->new(current_user => RT->system_user);
-$Collection->from_sql( "linked_from = $childid" );
+$Collection->from_sql( "LinkedFrom = $childid" );
is($Collection->count,1, "We found only one result");
ok($Collection->first);
is($Collection->first->id, $parentid, "We found all tickets linked from ticket #$childid");
@@ -206,7 +206,7 @@
ok( $has{$grand_childid}, "The collection have our grand child - $grand_childid");
$Collection = RT::Model::TicketCollection->new(current_user => RT->system_user);
-$Collection->from_sql( "linked_from IS NULL" );
+$Collection->from_sql( "LinkedFrom IS NULL" );
ok($Collection->count, "Result is set is not empty");
%has = ();
while (my $t = $Collection->next) {
@@ -218,7 +218,7 @@
ok( $has{$unlinked_id}, "unlinked is in collection");
$Collection = RT::Model::TicketCollection->new(current_user => RT->system_user);
-$Collection->from_sql( "linked_from IS NOT NULL" );
+$Collection->from_sql( "LinkedFrom IS NOT NULL" );
ok($Collection->count, "Result set is not empty");
%has = ();
while (my $t = $Collection->next) {
More information about the Rt-commit
mailing list