From: ivan Date: Wed, 14 Nov 2007 23:10:26 +0000 (+0000) Subject: add link to resolved tickets too X-Git-Tag: freeside_1_7_3rc1~265 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=300cc462cd5427c49369dc72ef6782e96eee7ef0;p=freeside.git add link to resolved tickets too --- diff --git a/FS/FS/TicketSystem/RT_External.pm b/FS/FS/TicketSystem/RT_External.pm index a668beba1..8564cf3d0 100644 --- a/FS/FS/TicketSystem/RT_External.pm +++ b/FS/FS/TicketSystem/RT_External.pm @@ -167,18 +167,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 84cc90299..4f7a231e4 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -31,8 +31,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';