TT#67104 - Change callist ?customer_id= parameter query OR to UNION ALL

* Change sql 'or' which was still in use
	   when filtering with customer_id to
	   'union_all' which changes order of
	   status from enum to alphabetical  so
	   it's now consistent to what happens
	   when filtering with subscriber_id

Change-Id: I82eea0059d6b414e1148b16d47d4c189a3f43238
changes/54/33954/2
Flaviu Mates 7 years ago
parent 38da351307
commit 90fc11b1cf

@ -59,12 +59,14 @@ sub query_params {
new_rs => sub {
my ($c,$q,$rs) = @_;
if ($c->user->roles ne "subscriber" and $c->user->roles ne "subscriberadmin" and not exists $c->req->query_params->{subscriber_id}) {
return NGCP::Panel::Utils::CallList::call_list_suppressions_rs($c,$rs->search_rs({
-or => [
'source_account_id' => $q,
'destination_account_id' => $q,
],
},undef),NGCP::Panel::Utils::CallList::SUPPRESS_INOUT);
my $out_rs = NGCP::Panel::Utils::CallList::call_list_suppressions_rs($c,$rs->search_rs({
source_account_id => $q,
}),NGCP::Panel::Utils::CallList::SUPPRESS_OUT);
my $in_rs = NGCP::Panel::Utils::CallList::call_list_suppressions_rs($c,$rs->search_rs({
destination_account_id => $q,
source_account_id => { '!=' => $q },
}),NGCP::Panel::Utils::CallList::SUPPRESS_IN);
return $out_rs->union_all($in_rs);
}
return $rs;
},

Loading…
Cancel
Save