X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FTicketSystem%2FRT_Internal.pm;h=f8105e6402978589f093c05fe8d40add55110269;hb=9ff504a21d361a27997e94e74908ab663a57f207;hp=6fb2c187de835db9f7b75e211add7623d5cb0927;hpb=1437328351c06d1addc673dd1532c8959c77f426;p=freeside.git diff --git a/FS/FS/TicketSystem/RT_Internal.pm b/FS/FS/TicketSystem/RT_Internal.pm index 6fb2c187d..f8105e640 100644 --- a/FS/FS/TicketSystem/RT_Internal.pm +++ b/FS/FS/TicketSystem/RT_Internal.pm @@ -111,7 +111,7 @@ properly. # create an RT::Tickets object for a specified custnum or svcnum sub _tickets_search { - my( $self, $type, $number, $limit, $priority, $status ) = @_; + my( $self, $type, $number, $limit, $priority, $status, $queueid ) = @_; $type =~ /^Customer|Service$/ or die "invalid type: $type"; $number =~ /^\d+$/ or die "invalid custnum/svcnum: $number"; @@ -159,6 +159,8 @@ sub _tickets_search { join(' OR ', map { "Status = '$_'" } @statuses). ' ) '; + $rtql .= " AND Queue = $queueid " if $queueid; + warn "$me _customer_tickets_search:\n$rtql\n" if $DEBUG; $Tickets->FromSQL($rtql); @@ -238,7 +240,8 @@ sub service_tickets { sub _ticket_info { # Takes an RT::Ticket; returns a hashref of the ticket's fields, including # custom fields. Also returns custom and selfservice priority values as - # _custom_priority and _selfservice_priority. + # _custom_priority and _selfservice_priority, and the IsUnreplied property + # as is_unreplied. my $t = shift; my $custom_priority = @@ -263,6 +266,7 @@ sub _ticket_info { if ( $ss_priority ) { $ticket_info{'_selfservice_priority'} = $ticket_info{"CF.{$ss_priority}"}; } + $ticket_info{'is_unreplied'} = $t->IsUnreplied; my $svcnums = [ map { $_->Target =~ /cust_svc\/(\d+)/; $1 } @{ $t->Services->ItemsArrayRef }