summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/TicketSystem/RT_Internal.pm13
-rw-r--r--httemplate/view/cust_main/tickets.html2
2 files changed, 11 insertions, 4 deletions
diff --git a/FS/FS/TicketSystem/RT_Internal.pm b/FS/FS/TicketSystem/RT_Internal.pm
index 220b4a011..67554151f 100644
--- a/FS/FS/TicketSystem/RT_Internal.pm
+++ b/FS/FS/TicketSystem/RT_Internal.pm
@@ -50,7 +50,7 @@ sub access_right {
sub session {
my( $self, $session ) = @_;
- if ( $session && $session->{'Current_User'} ) {
+ if ( $session && $session->{'Current_User'} ) { # does this even work?
warn "$me session: using existing session and CurrentUser: \n".
Dumper($session->{'CurrentUser'})
if $DEBUG;
@@ -123,16 +123,23 @@ sub _customer_tickets_search {
if ( defined( $priority ) ) {
my $custom_priority = FS::Conf->new->config('ticket_system-custom_priority_field');
- $rtql .= " AND CF.{$custom_priority} = '$priority'";
+ if ( length( $priority ) ) {
+ $rtql .= " AND CF.{$custom_priority} = '$priority'";
+ }
+ else {
+ $rtql .= " AND CF.{$custom_priority} IS NULL";
+ }
}
$rtql .= ' AND ( ' .
join(' OR ', map { "Status = '$_'" } $self->statuses) .
' )';
+ warn "$me _customer_tickets_search:\n$rtql\n" if $DEBUG;
$Tickets->FromSQL($rtql);
$Tickets->RowsPerPage($limit);
+ warn "\n\n" . $Tickets->BuildSelectQuery . "\n\n" if $DEBUG > 1;
return $Tickets;
}
@@ -192,7 +199,7 @@ sub _ticket_info {
}
# make this easy to find
if ( $custom_priority ) {
- $ticket_info{'_custom_priority'} = $ticket_info{"CF.{$custom_priority}"};
+ $ticket_info{'content'} = $ticket_info{"CF.{$custom_priority}"};
}
if ( $ss_priority ) {
$ticket_info{'_selfservice_priority'} = $ticket_info{"CF.{$ss_priority}"};
diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html
index 0c48d2196..e0262b895 100644
--- a/httemplate/view/cust_main/tickets.html
+++ b/httemplate/view/cust_main/tickets.html
@@ -122,7 +122,7 @@ my $open_link = FS::TicketSystem->href_customer_tickets($cust_main->custnum);
my $openlabel = join('/', FS::TicketSystem->statuses );
my $res_link = FS::TicketSystem->href_customer_tickets(
- $cust_main->Custnum,
+ $cust_main->custnum,
{ 'statuses' => [ 'resolved' ] }
);