Bugzilla – Attachment 152988 Details for
Bug 33974
Add ability to search biblios endpoint using any biblioitem attribute
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33974: (follow-up) biblionumber column needs special handling
Bug-33974-follow-up-biblionumber-column-needs-spec.patch (text/plain), 1.61 KB, created by
Tomás Cohen Arazi
on 2023-07-03 16:34:08 UTC
(
hide
)
Description:
Bug 33974: (follow-up) biblionumber column needs special handling
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2023-07-03 16:34:08 UTC
Size:
1.61 KB
patch
obsolete
>From 957db83169fd8d40efeda22880ca8965e7ccdc82 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 3 Jul 2023 13:30:56 -0300 >Subject: [PATCH] Bug 33974: (follow-up) biblionumber column needs special > handling > >This patch makes a particular use case be handled correctly: i.e. no >context is passed (e.g. 'biblio' explicitly) and the query is done >against the `biblio_id` attribute. This results in the following DBIC >error: > >[ERROR] GET /api/v1/biblios: unhandled exception (DBIx::Class::Exception)<<DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'biblionumber' in where clause is ambiguous at /kohadevbox/koha/Koha/Objects.pm line 394>> > >With this patch, this is no longuer the case :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Biblios.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/Koha/Biblios.pm b/Koha/Biblios.pm >index e43b63fbff8..0cc05aaba8f 100644 >--- a/Koha/Biblios.pm >+++ b/Koha/Biblios.pm >@@ -93,6 +93,8 @@ sub api_query_fixer { > } else { > $query =~ > s/${quotes}(age_restriction|cn_class|cn_item|cn_sort|cn_source|cn_suffix|collection_issn|collection_title|collection_volume|ean|edition_statement|illustrations|isbn|issn|item_type|lc_control_number|notes|number|pages|publication_place|publication_year|publisher|material_size|serial_total_issues|url|volume|volume_date|volume_description)${quotes}/${quotes}biblioitem\.$1${quotes}/g; >+ $query =~ # handle ambiguous 'biblionumber' >+ s/${quotes}(biblio_id)${quotes}/${quotes}me\.$1${quotes}/g; > } > > return $query; >-- >2.41.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 33974
:
152433
|
152434
|
152435
|
152487
|
152488
|
152489
|
152765
|
152766
|
152767
|
152983
|
152984
|
152985
|
152986
| 152988 |
153104