diff options
| -rw-r--r-- | FS/FS/TicketSystem/RT_External.pm | 16 | ||||
| -rw-r--r-- | 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 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 @@  <A NAME="tickets"><FONT SIZE="+2">Tickets</FONT></A>  <BR> -(<A HREF="<% FS::TicketSystem->href_customer_tickets($cust_main->custnum) %>">View all tickets for this customer</A>) -(<A HREF="<% FS::TicketSystem->href_new_ticket($cust_main, join(', ', grep { $_ !~ /^(POST|FAX)$/ } $cust_main->invoicing_list ) ) %>">New ticket for this customer</A>) +(<A HREF="<% FS::TicketSystem->href_customer_tickets($cust_main->custnum) %>">View <% join('/', FS::TicketSystem->statuses ) %> tickets for this customer</A>) +(<A HREF="<% FS::TicketSystem->href_customer_tickets($cust_main->custnum, { 'statuses' => [ 'resolved' ] } ) %>">View resolved tickets for this customer</A>) +<BR> +(<A HREF="<% FS::TicketSystem->href_new_ticket($cust_main, join(', ', grep { $_ !~ /^(POST|FAX)$/ } $cust_main->invoicing_list ) ) %>">Create new ticket for this customer</A>)  <% include("/elements/table-grid.html") %>  % my $bgcolor1 = '#eeeeee'; | 
