summaryrefslogtreecommitdiff
path: root/rt/lib
diff options
context:
space:
mode:
Diffstat (limited to 'rt/lib')
-rw-r--r--rt/lib/RT/Tickets_Overlay.pm6
-rw-r--r--rt/lib/RT/URI/freeside.pm25
-rw-r--r--rt/lib/RT/URI/freeside/Internal.pm25
3 files changed, 56 insertions, 0 deletions
diff --git a/rt/lib/RT/Tickets_Overlay.pm b/rt/lib/RT/Tickets_Overlay.pm
index 687be738e..5a7e02056 100644
--- a/rt/lib/RT/Tickets_Overlay.pm
+++ b/rt/lib/RT/Tickets_Overlay.pm
@@ -1791,6 +1791,12 @@ sub OrderByCols {
$custalias.last || ', ' || $custalias.first
)";
}
+ elsif ( $subkey eq 'Class' ) {
+ $field = "$custalias.classnum";
+ }
+ elsif ( $subkey eq 'Agent' ) {
+ $field = "$custalias.agentnum";
+ }
else {
# no other cases exist yet, but for obviousness:
$field = $subkey;
diff --git a/rt/lib/RT/URI/freeside.pm b/rt/lib/RT/URI/freeside.pm
index 00a9ebb1c..33845dda6 100644
--- a/rt/lib/RT/URI/freeside.pm
+++ b/rt/lib/RT/URI/freeside.pm
@@ -299,6 +299,31 @@ if ($@ &&
die $@;
};
+=item AgentName
+
+Return the name of the customer's agent.
+
+=cut
+
+sub AgentName { undef }
+
+=item CustomerClass
+
+Return the name of the customer's class.
+
+=cut
+
+sub CustomerClass { undef }
+
+=item CustomerTags
+
+Return the list of tags attached to the customer. Each tag is returned
+as a hashref with keys "name", "desc", and "color".
+
+=cut
+
+sub CustomerTags { ( ) }
+
=back
=cut
diff --git a/rt/lib/RT/URI/freeside/Internal.pm b/rt/lib/RT/URI/freeside/Internal.pm
index b5af134ac..6d3adc2ef 100644
--- a/rt/lib/RT/URI/freeside/Internal.pm
+++ b/rt/lib/RT/URI/freeside/Internal.pm
@@ -142,4 +142,29 @@ sub _FreesideURILabelLong {
}
+sub AgentName {
+ my $self = shift;
+ my $rec = $self->_FreesideGetRecord() or return;
+ my $agent = $rec->{'_object'}->agent or return;
+ return $agent->agentnum . ': ' . $agent->agent;
+}
+
+sub CustomerClass {
+ my $self = shift;
+ my $rec = $self->_FreesideGetRecord() or return;
+ my $cust_class = $rec->{'_object'}->cust_class or return;
+ return $cust_class->classname;
+}
+
+sub CustomerTags {
+ my $self = shift;
+ my $rec = $self->_FreesideGetRecord() or return;
+ my @part_tag = $rec->{'_object'}->part_tag;
+ return map {
+ { 'name' => $_->tagname,
+ 'desc' => $_->tagdesc,
+ 'color' => $_->tagcolor }
+ } @part_tag;
+}
+
1;