[freeside-commits] freeside/rt/lib/RT Record.pm, 1.1.1.5.2.1, 1.1.1.5.2.2
Ivan,,,
ivan at wavetail.420.am
Sun Mar 23 18:28:12 PDT 2008
Update of /home/cvs/cvsroot/freeside/rt/lib/RT
In directory wavetail.420.am:/tmp/cvs-serv29593/lib/RT
Modified Files:
Tag: FREESIDE_1_7_BRANCH
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.5.2.1
retrieving revision 1.1.1.5.2.2
diff -u -d -r1.1.1.5.2.1 -r1.1.1.5.2.2
--- Record.pm 3 Mar 2008 23:07:46 -0000 1.1.1.5.2.1
+++ Record.pm 24 Mar 2008 01:28:10 -0000 1.1.1.5.2.2
@@ -1211,8 +1211,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