[Bug 34445] New: Default budget is not selected in addorderiso2709.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Bug ID: 34445 Summary: Default budget is not selected in addorderiso2709.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: matt.blenkinsop@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org When adding order lines to a basket from a staged marc file using the mappings in MarcItemFieldsToOrder a default budget should be selected when adding order lines if no budget is selected in the UI. Currently this does not happen and the order line creation fails. To replicate: 1) Add the following to the syspref MarcItemFieldsToOrder homebranch: 975$a holdingbranch: 975$b itype: 975$y nonpublic_note: 975$x public_note: 975$z loc: 975$c ccode: 975$8 notforloan: 975$7 uri: 975$u copyno: 975$n quantity: 975$q budget_code: 975$h price: 975$p replacementprice: 975$v 2) Save the file attached ready to stage 3) Navigate to Acquisitions, choose a vendor and then create/choose a basket 4) Click Add to basket and then From a new file 5) Choose the file you just saved 6) Change the Record matching rule to ISBN and the Action if matching record found to Ignore incoming record. Click stage for import 7) When the job progress is complete, click the Add staged files to basket button 8) Click on the Item information tab and in field y - Koha item type select Books 9) Click Select all on the table 10) Observe that under Item record 1, the budget_code field says "Select a fund...". Do not change this field, this is just to show that no budget has been selected 11) At the bottom of the form, click Save 12) You should be back on the basket page - observe that no order lines have been added -- 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=34445 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@ptfs-europe |ity.org |.com -- 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=34445 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 154084 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154084&action=edit Test file with mapped fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> 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=34445 --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 154085 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154085&action=edit Bug 34445: Set default budget in addorderiso2709.pl This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used. Test plan: 1) Apply patch 2) restart_all 3) Follow the steps from the bug description 4) Order lines should be added properly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |trivial -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Lucas Gass <lucas@bywatersolutions.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=34445 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154085|0 |1 is obsolete| | --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 154413 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154413&action=edit Bug 34445: Set default budget in addorderiso2709.pl This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used. Test plan: 1) Apply patch 2) restart_all 3) Follow the steps from the bug description 4) Order lines should be added properly Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- WARN tidiness The file is less tidy than before (bad/messy lines before: 307, now: 308) Please correct. This is a oneliner patch. Should be possible to tidy :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 --- Comment #5 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 154791 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154791&action=edit Bug 34445: (QA follow-up) Tidy file perl tidy for patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please squash. Note that perltidy does not like for (my $i = 0; $i < $count; $i++) { + # Use default budget if no budget selected in the UI + $budget_codes[$i] = $budget_id + if !$budget_codes[$i]; It seems to insert an empty line before the new comment line.. Sorry about that, i think it is nonsense.. Another question: You are putting an id in a field called budget_code. Are you really sure that this is correct?? It does not look good. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 --- Comment #7 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- The terminology is confusing, I think budget_codes needs changing to budget_ids because the values in the array are the integer values from the budget_id fields in aqbudgets. I'll change it and re-upload -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154791|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=34445 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154413|0 |1 is obsolete| | --- Comment #8 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 154795 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154795&action=edit Bug 34445: Set default budget in addorderiso2709.pl This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used. QA follow-up: - perl tidied - budget_codes changed to budget_ids for consistency Test plan: 1) Apply patch 2) restart_all 3) Follow the steps from the bug description 4) Order lines should be added properly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=34445 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154795|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 154874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154874&action=edit Bug 34445: Set default budget in addorderiso2709.pl This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used. QA follow-up: - perl tidied - budget_codes changed to budget_ids for consistency Test plan: 1) Apply patch 2) restart_all 3) Follow the steps from the bug description 4) Order lines should be added properly Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> [EDIT] Rearranged comments -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable Version(s)|23.11.00 |23.11.00,23.05.04 released in| | --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00,23.05.04 |23.11.00,23.05.04,22.11.10 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34445 --- Comment #12 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org