[Bug 41900] New: Subfield e source of acquisition no longer filled when importing records from a file
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 Bug ID: 41900 Summary: Subfield e source of acquisition no longer filled when importing records from a file Initiative type: --- Sponsorship --- status: 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 See bug 8676 - Koha used to populate 952 subfield e with the vendor id for all orders from staged records. I believe this was lost from either bug 35026 or bug 34355. Many libraries used this to track/report on where records came from. This is a regression that should be fixed. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de, | |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=41900 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We definitely use this information and it should be the same for all items that are created through the acq process. -- 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=41900 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Nick, is this limited to the records added through the staged process or is it affecting other acq workflows (add order from...) as well? -- 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=41900 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=41900 --- Comment #3 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 193977 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193977&action=edit Bug 41900: Convert source of acquisition to a pre-populated vendor dropdown Test plan: 1) Choose a vendor and select to add to a basket from either a new or staged file 2) Stage and import the file 3) On the screen to add the orders, click on the 'Item information' tab 4) In subfield e - Source of acquisition there should be a dropdown of vendors with your chosen vendor pre-populated -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matt.blenkinsop@openfifth.c | |o.uk 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=41900 --- Comment #4 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #2)
Nick, is this limited to the records added through the staged process or is it affecting other acq workflows (add order from...) as well?
It was noticed in the staging from file, I don't know how it is supposed to work - I am not sure this behavior was well documented, but it was relied upon I think it could be okay to make it require a mapping or config, it just needs to be made clear as well -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- At the moment it's a regression, I am not against making it configurable in the future. Acquisitions is supposed to fill in fields like price, replacement_price etc. as well as part of the process. I am not sure a vendor field to choose from makes sense as the order is linked to a vendor already. What happens if you change it? The vendor int he item would be different to the vendor it is ordered from. I think this would be a new 'feature' that could be quite dangerous too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 John Vinke <jvinke@austinseminary.edu> 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=41900 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193977|0 |1 is obsolete| | --- Comment #6 from John Vinke <jvinke@austinseminary.edu> --- Created attachment 194043 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194043&action=edit Bug 41900: Convert source of acquisition to a pre-populated vendor dropdown Test plan: 1) Choose a vendor and select to add to a basket from either a new or staged file 2) Stage and import the file 3) On the screen to add the orders, click on the 'Item information' tab 4) In subfield e - Source of acquisition there should be a dropdown of vendors with your chosen vendor pre-populated Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvinke@austinseminary.edu --- Comment #7 from John Vinke <jvinke@austinseminary.edu> --- I think I did that correctly. After applying the patch the vendor was preselected in the dropdown. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #8 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- So if I'm understanding correctly, I need to remove the vendor dropdown and just have it populate with the booksellerid? To prevent it being changed/removed should that field also be disabled/hidden? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Matt Blenkinsop from comment #8)
So if I'm understanding correctly, I need to remove the vendor dropdown and just have it populate with the booksellerid? To prevent it being changed/removed should that field also be disabled/hidden?
I have to admit, I am not sure if the vendor pull down was there before, it makes no real sense for me to change it in that spot and I would have expected it to just be set by selecting the vendor to order from first place, but others more used to the workflow might be able to tell. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 --- Comment #10 from John Vinke <jvinke@austinseminary.edu> --- Hopefully this is helpful and not a red herring. Current behavior in my production system (25.05.07.000) is that it does not populate anything unless that information is mapped from the marc record. I will say that my experience has been that 952$e displays as the vendor ID, not a drop down. Drop down might be nice, but it might be a bit odd to have it behave one way in one part of Koha and a different way everywhere else. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|matt.blenkinsop@openfifth.c |nick@bywatersolutions.com |o.uk | Keywords|regression | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194043|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 --- Comment #11 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 212631 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212631&action=edit Bug 41900: Unit tests Adds tests that items created through acquisitions get the basket vendor as source of acquisition (items.booksellerid), for: - PrepareItemrecordDisplay with a 'booksellerid' default value, used to prefill the acquisitions item forms - Koha::MarcOrder with MarcItemFieldsToOrder - Koha::Acquisition::Order->duplicate_to - EDI quotes (existing behaviour) Also adds xt/find-acquisition-item-links.t, which lists every place that links an item to an order line. It fails when one is added or removed, so a new path has to set the vendor and get a test too. Test plan: prove t/db_dependent/Items.t t/db_dependent/Koha/MarcOrder.t \ t/db_dependent/Koha/Acquisition/Order.t t/db_dependent/Koha/EDI.t \ xt/find-acquisition-item-links.t Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 --- Comment #12 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 212632 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212632&action=edit Bug 41900: Fill source of acquisition for items created when ordering Items created through acquisitions only got items.booksellerid (952$e, source of acquisition) when they were received. Items created while ordering - from a staged file, or with AcqCreateItem set to 'ordering' - had no vendor until receipt. This patch sets the vendor where the item data is entered: - The item forms on the 'Add orders from a staged file' and new order pages are prefilled with the vendor id in Source of acquisition. Staff can see it and change it before saving. - Items created from MarcItemFieldsToOrder, which have no item form, get the vendor when they are created. - Items copied by duplicating an order get the vendor of the new basket if they have no source of acquisition. PrepareItemrecordDisplay already takes default values for some fields (callnumber, branchcode, location, ccode); this adds booksellerid. The receiving item form is not prefilled, as receiving already sets the vendor on all received items. Test plan: 1. Set AcqCreateItem to 'ordering' 2. Set MarcItemFieldsToOrder, for example: homebranch: 970$a holdingbranch: 970$a itype: 970$i price: 970$p quantity: 970$b budget_code: 970$f 3. Stage a file of records containing matching 970 fields 4. Create a basket for a vendor and add orders from the staged file 5. View the items for the new records: Source of acquisition is empty 6. Stage another file without 970 fields, add orders from it and look at the 'Item information' tab: Source of acquisition is empty 7. Add an order to the basket from a new empty record, look at the item form: Source of acquisition is empty 8. Apply patch, restart_all 9. Repeat 3-4: Source of acquisition is now the vendor id on the items 10. Repeat 6 and 7: Source of acquisition is prefilled with the vendor id 11. Save the orders, confirm the items have the vendor id 12. Change the prefilled value before saving another order, confirm your value is kept 13. Duplicate an order into a basket of another vendor (Basket -> Add to basket -> From existing orders (copy)); confirm items without a Source of acquisition get the new vendor 14. Receive an order, confirm Source of acquisition is the vendor id 15. prove t/db_dependent/Items.t t/db_dependent/Koha/MarcOrder.t \ t/db_dependent/Koha/Acquisition/Order.t t/db_dependent/Koha/EDI.t \ xt/find-acquisition-item-links.t Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 --- Comment #13 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 212633 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212633&action=edit Bug 41900: Add Cypress test for prefilled source of acquisition Test plan: yarn cypress run --spec t/cypress/integration/Acquisitions/ItemSourceOfAcquisition_spec.ts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41900 --- Comment #14 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- So, after more research, I am not sure this is a regression - Koha has always and does still add the vendor id to the item during receiving. I removed the regression tag These patches seek to also add it during the creation of the items. I initially looked at adding it in the modules, but that was a litte tricky - getting the info into the xml for AddItemFromMarc required some extra params which felt odd and specific. This patch adds them to the interface during creation, and the librarian can edit if they wish, but it should cover all the cases. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org