[Bug 39752] New: Koha MarcOrder does not verify biblio exists when adding order and items
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 Bug ID: 39752 Summary: Koha MarcOrder does not verify biblio exists when adding order and items Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org 393 my $match = $matches->count ? $matches->next : undef; 394 my $biblionumber = $match ? $match->candidate_match_id : 0; 396 if ($biblionumber) { 397 $import_record->status('imported')->store; 398 if ( $overlay_action eq 'replace' ) { 399 my $biblio = Koha::Biblios->find($biblionumber); 400 $import_record->replace( { biblio => $biblio } ); 401 } 402 } else { import_record_matches does not have a foreign key to biblios stage + import some records to Koha stage again, matching on isbn - you should find matches form first import delete the records that already exist in koha SELECT * FROM import_record_matches Note that the matches are still there If you try adding these to a basket it will die because of the invalid match trying to be used as a bilbio -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 181576 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181576&action=edit Bug 39752: Check for biblio existence when matches are found Currently when adding to a basket from a new/staged file, we don't check whether a matched record still exists when importing. This patch changes the conditional check to be based on the existence of the biblio record rather than just on the biblionumber from the match Test plan: 1) Stage and import a record into Koha 2) Stage the same record again, this time matching on ISBN 3) Check that the match has been found in the batch details 4) Delete the original record that you imported in step 1 5) Find a basket, and add to it from a staged file 6) Choose the file/record you imported in stage 2 7) Select the record and save to add the orders 8) You will get a 500 error 9) Apply patch and restart_all 10) Refresh the page to re-submit the form 11) The form should submit correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181576|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 181639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181639&action=edit Bug 39752: Check for biblio existence when matches are found Currently when adding to a basket from a new/staged file, we don't check whether a matched record still exists when importing. This patch changes the conditional check to be based on the existence of the biblio record rather than just on the biblionumber from the match Test plan: 1) Stage and import a record into Koha 2) Stage the same record again, this time matching on ISBN 3) Check that the match has been found in the batch details 4) Delete the original record that you imported in step 1 5) Find a basket, and add to it from a staged file 6) Choose the file/record you imported in stage 2 7) Select the record and save to add the orders 8) You will get a 500 error 9) Apply patch and restart_all 10) Refresh the page to re-submit the form 11) The form should submit correctly Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 --- Comment #3 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 181656 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181656&action=edit Bug 39752: (QA follow-up) Unit test Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181639|0 |1 is obsolete| | --- Comment #4 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 181657 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181657&action=edit Bug 39752: Check for biblio existence when matches are found Currently when adding to a basket from a new/staged file, we don't check whether a matched record still exists when importing. This patch changes the conditional check to be based on the existence of the biblio record rather than just on the biblionumber from the match Test plan: 1) Stage and import a record into Koha 2) Stage the same record again, this time matching on ISBN 3) Check that the match has been found in the batch details 4) Delete the original record that you imported in step 1 5) Find a basket, and add to it from a staged file 6) Choose the file/record you imported in stage 2 7) Select the record and save to add the orders 8) You will get a 500 error 9) Apply patch and restart_all 10) Refresh the page to re-submit the form 11) The form should submit correctly Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Koha MarcOrder does not |Koha MarcOrder does not |verify biblio exists when |verify bibliographic record |adding order and items |exists when adding order | |and items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 carthur@slolibrary.org <carthur@slolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carthur@slolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|25.05.00 |25.05.00,24.11.10 released in| | Status|Pushed to main |Pushed to stable --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39752 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #7 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org