From 6eae8e86517298d4de53d9754487d53b4f29765d Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 14 Nov 2007 23:10:25 +0000 Subject: [PATCH] add link to resolved tickets too --- FS/FS/TicketSystem/RT_External.pm | 16 +++++++++++++--- httemplate/view/cust_main/tickets.html | 6 ++++-- 2 files changed, 17 insertions(+), 5 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 ) { diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index c4183ae55..c9c3b6d1b 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -6,8 +6,10 @@ Tickets
-(View all tickets for this customer) -(New ticket for this customer) +(View <% join('/', FS::TicketSystem->statuses ) %> tickets for this customer) +(View resolved tickets for this customer) +
+(Create new ticket for this customer) <% include("/elements/table-grid.html") %> % my $bgcolor1 = '#eeeeee'; -- 2.11.0