Bug 36641: Return '*' for 'default rule'
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
d34a6046a6
commit
8754e100f4
1 changed files with 8 additions and 4 deletions
|
@ -124,7 +124,11 @@ sub list_rules {
|
||||||
) // {};
|
) // {};
|
||||||
push @{$rules}, $effective_rules;
|
push @{$rules}, $effective_rules;
|
||||||
} else {
|
} else {
|
||||||
my $select = [ 'branchcode', 'categorycode', 'itemtype' ];
|
my $select = [
|
||||||
|
{ 'COALESCE' => [ 'branchcode', \["'*'"] ], -as => 'branchcode' },
|
||||||
|
{ 'COALESCE' => [ 'categorycode', \["'*'"] ], -as => 'categorycode' },
|
||||||
|
{ 'COALESCE' => [ 'itemtype', \["'*'"] ], -as => 'itemtype' }
|
||||||
|
];
|
||||||
my $as = [ 'branchcode', 'categorycode', 'itemtype' ];
|
my $as = [ 'branchcode', 'categorycode', 'itemtype' ];
|
||||||
for my $kind ( @{$kinds} ) {
|
for my $kind ( @{$kinds} ) {
|
||||||
push @{$select}, { max => \[ "CASE WHEN rule_name = ? THEN rule_value END", $kind ], -as => $kind };
|
push @{$select}, { max => \[ "CASE WHEN rule_name = ? THEN rule_value END", $kind ], -as => $kind };
|
||||||
|
|
Loading…
Reference in a new issue