Bugzilla – Attachment 148958 Details for
Bug 33276
Library limitations will cause data loss when editing locations in the subscription form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33276: Get auth values for location on serials
Bug-33276-Get-auth-values-for-location-on-serials.patch (text/plain), 1.50 KB, created by
Clemens Tubach
on 2023-03-30 08:44:22 UTC
(
hide
)
Description:
Bug 33276: Get auth values for location on serials
Filename:
MIME Type:
Creator:
Clemens Tubach
Created:
2023-03-30 08:44:22 UTC
Size:
1.50 KB
patch
obsolete
>From fa35a4dbf5dae11cd90feed029d24e1bc98849a1 Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Thu, 16 Mar 2023 10:25:35 +0100 >Subject: [PATCH] Bug 33276: Get auth values for location on serials > >Serial location is linked to a library, if we want to modify serial >with users does not belongs to, location is not in select and we could >erase it. > >Test plan: > >1) Be sure to have a LOC authorized value limited to one library at >least >2) See when editing serial subscription you didn't get the current >location >3) Apply this patch >4) Refresh and now you've got the value > >Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> >--- > serials/subscription-add.pl | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index c08142b897..700c815a05 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -124,6 +124,19 @@ if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { > > my $locations_loop = GetAuthorisedValues("LOC"); > my $ccodes_loop = GetAuthorisedValues("CCODE"); >+my @loc_av; >+ >+for my $loc (@$locations_loop) { >+ push @loc_av, $loc->{authorised_value}; >+} >+ >+if ( !grep { $_ eq $subs->{location} } @loc_av ) { >+ my $location_av = Koha::AuthorisedValues->search( >+ { authorised_value => $subs->{location} } )->next; >+ if ($location_av) { >+ push @$locations_loop, $location_av; >+ } >+} > > $template->param( > branchcode => $subs->{branchcode}, >-- >2.30.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 33276
:
148412
| 148958