Bug 31326

Summary: Koha::Biblio->get_components_query fetches too many component parts
Product: Koha Reporter: Johanna Räisä <johanna.raisa>
Component: SearchingAssignee: Johanna Räisä <johanna.raisa>
Status: RESOLVED FIXED QA Contact: Kyle M Hall <kyle>
Severity: normal    
Priority: P5 - low CC: emmi.takkinen, kyle, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
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
Attachments: Bug 31326: Koha::Biblio->get_components_query fetches too many component parts
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts

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 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 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.