[Rt-commit] r14451 - rt/3.8/trunk/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Wed Jul 23 22:46:34 EDT 2008
Author: ruz
Date: Wed Jul 23 22:46:33 2008
New Revision: 14451
Modified:
rt/3.8/trunk/lib/RT/Ticket_Overlay.pm
Log:
* add Merged method
Modified: rt/3.8/trunk/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Ticket_Overlay.pm (original)
+++ rt/3.8/trunk/lib/RT/Ticket_Overlay.pm Wed Jul 23 22:46:33 2008
@@ -2601,6 +2601,29 @@
return ( 1, $self->loc("Merge Successful") );
}
+=head2 Merged
+
+Returns list of tickets' ids that's been merged into this ticket.
+
+=cut
+
+sub Merged {
+ my $self = shift;
+
+ my $mergees = new RT::Tickets( $self->CurrentUser );
+ $mergees->Limit(
+ FIELD => 'EffectiveId',
+ OPERATOR => '=',
+ VALUE => $self->Id,
+ );
+ $mergees->Limit(
+ FIELD => 'id',
+ OPERATOR => '!=',
+ VALUE => $self->Id,
+ );
+ return map $_->id, @{ $mergees->ItemsArrayRef };
+}
+
# }}}
# }}}
More information about the Rt-commit
mailing list