[Bug 44293] New: Ordering a single record from a staged file does not return to the staged file
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44293 Bug ID: 44293 Summary: Ordering a single record from a staged file does not return to the staged file Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: thibaud.guillot@biblibre.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- When adding to a basket from a staged file, the "New order" button of a record links to neworderempty.pl with an empty import_batch_id: the template uses biblio.import_batch_id, which is not set by Koha::MarcOrder->import_biblios_list. Once the order is saved, Koha goes back to the basket instead of the staged file. When import_batch_id is set, addorder.pl redirects to addorderiso2709.pl with booksellerid=$$orderinfo{booksellerid}, but $orderinfo never contains booksellerid. The redirect URL has an empty booksellerid and addorderiso2709.pl dies: "Can't call method "name" on an undefined value at acqui/addorderiso2709.pl" Both must be fixed together: fixing only the link turns the wrong redirect into an internal server error. To reproduce: 1. Stage a MARC file (Cataloging > Stage records for import) 2. Acquisitions > a basket > Add to basket > From a staged file, choose the file 3. Click "New order" on a record, fill the form and save => You are back on the basket page, not on the staged file -- 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=44293 Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Sponsorship status|--- |Sponsored Status|NEW |Needs Signoff Comma delimited| |BibLibre list of Sponsors| | Assignee|koha-bugs@lists.koha-commun |thibaud.guillot@biblibre.co |ity.org |m -- 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=44293 --- Comment #1 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- Created attachment 212628 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212628&action=edit Bug 44293: Return to the staged file after ordering a single record When adding to a basket from a staged file, the "New order" button sends an empty import_batch_id (biblio.import_batch_id does not exist), so Koha goes back to the basket instead of the staged file once the order is saved. Fixing the link alone is not enough: addorder.pl builds the return URL with $$orderinfo{booksellerid}, which is never set, and addorderiso2709.pl then dies with "Can't call method "name" on an undefined value". This patch passes the batch id in the link and takes the vendor from the basket. Test plan: 1. Stage a MARC file (Cataloging > Stage records for import) 2. Acquisitions > a basket > Add to basket > From a staged file, choose the file 3. Click "New order" on a record, fill the form and save => You are back on the basket page 4. Apply the patch, restart_all 5. Repeat 2 and 3 => You are back on the staged file, the ordered record is no longer listed -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org