[freeside-commits] freeside/rt/lib/RT Record.pm,1.1.1.8,1.3
Ivan,,,
ivan at wavetail.420.am
Sun Mar 23 18:28:11 PDT 2008
Update of /home/cvs/cvsroot/freeside/rt/lib/RT
In directory wavetail.420.am:/tmp/cvs-serv29591/lib/RT
Modified Files:
Record.pm
Log Message:
part two of #1160: linking a ticket to its first customer will auto-link any customerless requestors
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/RT/Record.pm,v
retrieving revision 1.1.1.8
retrieving revision 1.3
diff -u -d -r1.1.1.8 -r1.3
--- Record.pm 2 Mar 2008 04:08:44 -0000 1.1.1.8
+++ Record.pm 24 Mar 2008 01:28:09 -0000 1.3
@@ -1231,8 +1231,37 @@
# }}}
+# {{{ Customers
+
+=head2 Customers
+
+ This returns an RT::Links object which references all the customers that this object is a member of.
+=cut
+sub Customers {
+ my( $self, %opt ) = @_;
+ my $Debug = $opt{'Debug'};
+
+ unless ( $self->{'Customers'} ) {
+
+ $self->{'Customers'} = $self->MemberOf->Clone;
+
+ $self->{'Customers'}->Limit(
+ FIELD => 'Target',
+ OPERATOR => 'STARTSWITH',
+ VALUE => 'freeside://freeside/cust_main/',
+ );
+ }
+
+ warn "->Customers method called on $self; returning ".
+ ref($self->{'Customers'}). ' object'
+ if $Debug;
+
+ return $self->{'Customers'};
+}
+
+# }}}
# {{{ sub _Links
More information about the freeside-commits
mailing list