Bug 31326 - Koha::Biblio->get_components_query fetches too many component parts
Summary: Koha::Biblio->get_components_query fetches too many component parts
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Johanna Räisä
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-09 07:41 UTC by Johanna Räisä
Modified: 2023-12-28 20:44 UTC (History)
3 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.03
Circulation function:


Attachments
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts (2.87 KB, patch)
2022-08-09 09:09 UTC, Johanna Räisä
Details | Diff | Splinter Review
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts (3.10 KB, patch)
2022-12-02 12:59 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts (3.15 KB, patch)
2022-12-04 02:13 UTC, David Nind
Details | Diff | Splinter Review
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts (3.20 KB, patch)
2023-01-20 14:08 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Johanna Räisä 2022-08-09 07:41:21 UTC
If QueryAutoTruncate is set to automatic then get_components_query is fetching too many component parts. Component parts are linked to host if rcn begins with the same value.
Comment 1 Johanna Räisä 2022-08-09 09:09:00 UTC
Created attachment 138886 [details] [review]
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts

This patch adds double quotes to rcn and cni when searching component parts
with get_components_query.

Test plan:
1) Apply the patch
2) prove Koha/t/db_dependent/Koha/Biblio.t
Comment 2 Katrin Fischer 2022-11-19 21:05:02 UTC
Hi Johanna, could you please rebase?
Comment 3 Emmi Takkinen 2022-12-02 12:59:22 UTC
Created attachment 144398 [details] [review]
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts

This patch adds double quotes to rcn and cni when searching component parts
with get_components_query.

Test plan:
1) Apply the patch
2) prove Koha/t/db_dependent/Koha/Biblio.t

Sponsored-by: Koha-Suomi Oy
Comment 4 David Nind 2022-12-04 02:13:18 UTC
Created attachment 144416 [details] [review]
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts

This patch adds double quotes to rcn and cni when searching component parts
with get_components_query.

Test plan:
1) Apply the patch
2) prove Koha/t/db_dependent/Koha/Biblio.t

Sponsored-by: Koha-Suomi Oy

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Kyle M Hall (khall) 2023-01-20 14:08:41 UTC
Created attachment 145513 [details] [review]
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts

This patch adds double quotes to rcn and cni when searching component parts
with get_components_query.

Test plan:
1) Apply the patch
2) prove Koha/t/db_dependent/Koha/Biblio.t

Sponsored-by: Koha-Suomi Oy

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi (tcohen) 2023-01-31 14:08:08 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 7 Jacob O'Mara 2023-01-31 18:10:45 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.