summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorivan <ivan>2007-11-14 23:10:25 +0000
committerivan <ivan>2007-11-14 23:10:25 +0000
commit6eae8e86517298d4de53d9754487d53b4f29765d (patch)
tree471bdb0645b7ff12c54415bfa064d77bb51a8944 /FS/FS
parent1737abc0d3f9e5b615e833af0f2a7afd59f876e8 (diff)
add link to resolved tickets too
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/TicketSystem/RT_External.pm16
1 files changed, 13 insertions, 3 deletions
diff --git a/FS/FS/TicketSystem/RT_External.pm b/FS/FS/TicketSystem/RT_External.pm
index be5f22a77..bcad43bc5 100644
--- a/FS/FS/TicketSystem/RT_External.pm
+++ b/FS/FS/TicketSystem/RT_External.pm
@@ -173,18 +173,28 @@ sub statuses {
}
sub href_customer_tickets {
- my( $self, $custnum, $priority ) = @_;
+ my( $self, $custnum ) = ( shift, shift );
+ my( $priority, @statuses);
+ if ( ref($_[0]) ) {
+ my $opt = shift;
+ $priority = $opt->{'priority'};
+ @statuses = $opt->{'statuses'} ? @{$opt->{'statuses'}} : $self->statuses;
+ } else {
+ $priority = shift;
+ @statuses = $self->statuses;
+ }
#my $href = $self->baseurl;
#i snarfed this from an RT bookmarked search, then unescaped (some of) it with
#perl -npe 's/%([0-9A-F]{2})/pack('C', hex($1))/eg;'
- my $href .=
+ #$href .=
+ my $href =
"Search/Results.html?Order=ASC&".
"Query= MemberOf = 'freeside://freeside/cust_main/$custnum' ".
#" AND ( Status = 'open' OR Status = 'new' OR Status = 'stalled' )"
- " AND ( ". join(' OR ', map "Status = '$_'", $self->statuses ). " ) "
+ " AND ( ". join(' OR ', map "Status = '$_'", @statuses ). " ) "
;
if ( defined($priority) && $field && $priority_field_queue ) {