Bugzilla – Attachment 171822 Details for
Bug 37947
Import from Z39.50 doesn't open the record in editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default"
Bug-37947-bug-37429-follow-up-Fix-addbiblio-and-fr.patch (text/plain), 2.92 KB, created by
Marcel de Rooy
on 2024-09-20 07:39:14 UTC
(
hide
)
Description:
Bug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default"
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-09-20 07:39:14 UTC
Size:
2.92 KB
patch
obsolete
>From e3bcd50857d99168334fc9f91b40a9baeefe7c05 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 19 Sep 2024 09:13:21 +0200 >Subject: [PATCH] Bug 37947: (bug 37429 follow-up) Fix addbiblio and > frameworkcode="Default" >Content-Type: text/plain; charset=utf-8 > >On bug 37429 we reordered the global var to assign them before anything >else. The logic is correct except for $frameworkcode, we want to do some >processings (like defaulting to "" if eq "Default") BEFORE we retrieve >the MARC structure ($tagslib, $usedTagsLib). > >This patch also moved this code after get_template_and_user (and so >authentication), like it should be everywhere. > >Test plan: >1. Go to Cataloging >2. Click on New from Z39.50/SRU >3. Make a search in the library of congress server for anything (Caroline searched for author: shakespeare) >4. Click on one of the results and choose Import >Without this patch the basic editor appears, but not the record >With this patch applied the bug is fixed and you can edit the record > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > cataloguing/addbiblio.pl | 35 ++++++++++++++++++----------------- > 1 file changed, 18 insertions(+), 17 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 9d41a15a64..397d1c92fe 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -517,6 +517,24 @@ my $fa_duedatespec = $input->param('duedatespec'); > > my $userflags = 'edit_catalogue'; > >+my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >+ { >+ template_name => "cataloguing/addbiblio.tt", >+ query => $input, >+ type => "intranet", >+ flagsrequired => { editcatalogue => $userflags }, >+ } >+); >+ >+$frameworkcode = &GetFrameworkCode($biblionumber) >+ if ( $biblionumber and not( defined $frameworkcode) and $op ne 'cud-addbiblio' ); >+ >+if ($frameworkcode eq 'FA'){ >+ $userflags = 'fast_cataloging'; >+} >+ >+$frameworkcode = '' if ( $frameworkcode eq 'Default' ); >+ > # Set default values for global variable > $tagslib = &GetMarcStructure( 1, $frameworkcode ); > $usedTagsLib = &GetUsedMarcStructure($frameworkcode); >@@ -530,23 +548,6 @@ if ( $op eq 'cud-change-framework' ) { > $changed_framework = 1; > } > >-$frameworkcode = &GetFrameworkCode($biblionumber) >- if ( $biblionumber and not( defined $frameworkcode) and $op ne 'cud-addbiblio' ); >- >-if ($frameworkcode eq 'FA'){ >- $userflags = 'fast_cataloging'; >-} >- >-$frameworkcode = '' if ( $frameworkcode eq 'Default' ); >-my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >- { >- template_name => "cataloguing/addbiblio.tt", >- query => $input, >- type => "intranet", >- flagsrequired => { editcatalogue => $userflags }, >- } >-); >- > my $logged_in_patron = Koha::Patrons->find($loggedinuser); > my $biblio; > >-- >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 37947
:
171709
|
171711
| 171822