Bugzilla – Attachment 169023 Details for
Bug 36641
Add an endpoint to list circulation rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36641: Ensure we return all keys
Bug-36641-Ensure-we-return-all-keys.patch (text/plain), 1.19 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-07-15 19:01:08 UTC
(
hide
)
Description:
Bug 36641: Ensure we return all keys
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-07-15 19:01:08 UTC
Size:
1.19 KB
patch
obsolete
>From f972c22a24128d04bb8da48669bfc18a5eb947bc Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 12 Jul 2024 15:14:01 +0100 >Subject: [PATCH] Bug 36641: Ensure we return all keys > >When using the effective route, we were missing some rule kinds if a >rule hadn't yet been defined for them. We should instead return the rule >as undefined. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/CirculationRules.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/Koha/REST/V1/CirculationRules.pm b/Koha/REST/V1/CirculationRules.pm >index 81e5c93f1ce..320be889611 100644 >--- a/Koha/REST/V1/CirculationRules.pm >+++ b/Koha/REST/V1/CirculationRules.pm >@@ -122,7 +122,11 @@ sub list_rules { > rules => $kinds > } > ) // {}; >- push @{$rules}, $effective_rules; >+ my $return; >+ for my $kind ( @{$kinds} ) { >+ $return->{$kind} = $effective_rules->{$kind}; >+ } >+ push @{$rules}, $return; > } else { > my $select = [ > { 'COALESCE' => [ 'branchcode', \["'*'"] ], -as => 'branchcode' }, >-- >2.45.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36641
:
165086
|
167937
|
167938
|
167946
|
167947
|
168018
|
168019
|
168020
|
168023
|
168024
|
168025
|
168365
|
168366
|
168367
|
168368
|
168369
|
168370
|
168378
|
168379
|
168395
|
168396
|
168397
|
168398
|
168399
|
168400
|
168401
|
168841
|
168874
|
168875
|
168876
|
168877
|
168878
|
168879
|
168880
|
168881
|
168882
|
168883
|
168884
|
168905
|
168906
|
168907
|
168908
|
168909
|
168910
|
168911
|
168912
|
168913
|
168914
|
168915
|
168916
|
168926
|
168927
|
168928
|
168929
|
168930
|
168931
|
168932
|
168933
|
168934
|
168935
|
168936
|
168937
|
168938
|
168940
|
169013
|
169014
|
169015
|
169016
|
169017
|
169018
|
169019
|
169020
|
169021
|
169022
| 169023 |
169024
|
169025
|
169026