Bugzilla – Attachment 109752 Details for
Bug 20310
Article requests: Use details from the host record when submitting an article request on an analytic record without attached items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20310: (follow-up) Add or remove orgcode in second try
Bug-20310-follow-up-Add-or-remove-orgcode-in-secon.patch (text/plain), 1.46 KB, created by
Marcel de Rooy
on 2020-09-08 14:06:18 UTC
(
hide
)
Description:
Bug 20310: (follow-up) Add or remove orgcode in second try
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-09-08 14:06:18 UTC
Size:
1.46 KB
patch
obsolete
>From afdc4f42bb29172daf286bfe92810b3341779dfe Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 8 Sep 2020 12:59:53 +0000 >Subject: [PATCH] Bug 20310: (follow-up) Add or remove orgcode in second try >Content-Type: text/plain; charset=utf-8 > >We did remove an orgcode, but we could also do the other way >around. > >Note: Hard to include in the unit test since it mocks the whole >search engine part. > >Test plan: >[1] Run t/db_dependent/Koha/Biblio/host_record.t >[2] Test host 001 = number and child 773 = (org)number >[3] Test host 001 = (org)number and child 773 = number > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Biblio.pm | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 6b4a21ef0f..468591c66e 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -864,8 +864,14 @@ sub host_record { > $bibno = $engine->extract_biblionumber( $results->[0] ); > last; > } >- # Extract number from $w (remove orgcode) for second try >- $rcn= $1 if $try == 1 && $rcn =~ /\)\s*(\d+)/; >+ # Add or remove orgcode for second try >+ if( $try == 1 && $rcn =~ /\)\s*(\d+)/ ) { >+ $rcn = $1; # number only >+ } elsif( $try == 1 && $rcn =~ /^\d+/ ) { >+ $rcn = "($orgcode)$rcn"; >+ } else { >+ last; >+ } > } > if( $bibno ) { > my $host = Koha::Biblios->find($bibno) or return; >-- >2.11.0
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 20310
:
73142
|
73143
|
73805
|
73998
|
74000
|
74992
|
74993
|
74994
|
88887
|
88888
|
88889
|
109750
|
109751
|
109752
|
109753
|
111467
|
111468
|
111469
|
111470
|
118976
|
118977
|
118978
|
118979
|
119346
|
122469
|
122470
|
122471
|
122472
|
122473
|
122474
|
122475
|
122725
|
122726
|
122727
|
122728
|
122729
|
122730
|
122731
|
122732