[Bug 35892] New: Fallback to GetMarcPrice in addorderiso2907 no longer works
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Bug ID: 35892 Summary: Fallback to GetMarcPrice in addorderiso2907 no longer works Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Bug 34169 broke a fall back to the GetMarcPrice routine when ordering from a file. Previously if there was no order, the field was blank and evaluated as 'false' and we used the price from the MARC record. Now the field is '0.00' if no price is mapped in MarcFieldsToOrder. perl -e 'warn "True" if "0.00"'; IN addorderiso2907.pl: my $c_price = $input->param( 'price_' . $import_record->import_record_id ) || GetMarcPrice( $marcrecord, C4::Context->preference('marcflavour') ); We could simply add 0 to tthe value to make it a number: perl -e 'warn "True" if "0.00"+ 0'; However, this would mean leaving the field at 0.00 when you didn't pay for something would change it to the GetMarcPrice. I think the solution may be to populate the field using the GetMarcPrice on the initial load. You can workaround this by adding the fallback to the MarcFieldsToOrder system preference: price: 947$c|020$c Which may be a viable solution for updating/editing the default values/documentatoin for that preference -- 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=35892 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |34169 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34169 [Bug 34169] Add validation for monetary input fields in acquisition module -- 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=35892 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35912 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35912 [Bug 35912] Item prices not populating order form when adding to a basket from a staged file -- 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=35892 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=35892 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 161466 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161466&action=edit Bug 35892: Populate order price using GetMarcPrice if no price specified Previously this happened after the fact, automagically, if no price was included in the order record. We should rather load the Marc price into the order form if we don't have a price form the '...ToOrder' system preferences To test: Setup -- Set systempreferences below MarcFieldsToOrder: price: 949$g quantity: 949$k budget_code: 949$l discount: 949$m sort1: 949$n sort2: 949$q MarcItemFieldsToOrder: homebranch: 949$a holdingbranch: 949$b itype: 949$y nonpublic_note: 949$x public_note: 949$z loc: 949$c ccode: 949$8 notforloan: 949$7 uri: 949$u copyno: 949$t replacementprice: 949$v itemcallnumber: 949$o quantity: 949$k budget_code: 949$l Stage the attached bib-303.marcxml file Add to basket from the staged file Note that item prices are populated as '6.50' from 949$g Cancel Update MarcFieldsToOrder and map price to "020$c" Add to basket from the staged file Note the price is not populated, because 020$c contains a dollar sign Cancel Apply patch, restart all Add to basket from the staged file Note the price is now correctly populated from fallback to GetMarcPrice Note: GetMarcPrice does some automatic munging, that's why 020$c on it's own doesn't work - this could be done to fields in MarcFieldsToOrder/MarcItemFieldsToOrder but this would be an enhancement. This bug simply restores the previous behavious, but does it on the front end and is more obvious to the user -- 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=35892 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35913 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35913 [Bug 35913] Item order prices do not fall back to MarcFieldsToOrder if not set by MarcItemFieldsToOrder -- 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=35892 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 161467 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161467&action=edit Test order 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=35892 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=35892 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161466|0 |1 is obsolete| | --- Comment #3 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 161468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161468&action=edit Bug 35892: Populate order price using GetMarcPrice if no price specified Previously this happened after the fact, automagically, if no price was included in the order record. We should rather load the Marc price into the order form if we don't have a price form the '...ToOrder' system preferences To test: Setup -- Set systempreferences below MarcFieldsToOrder: price: 949$g quantity: 949$k budget_code: 949$l discount: 949$m sort1: 949$n sort2: 949$q MarcItemFieldsToOrder: homebranch: 949$a holdingbranch: 949$b itype: 949$y nonpublic_note: 949$x public_note: 949$z loc: 949$c ccode: 949$8 notforloan: 949$7 uri: 949$u copyno: 949$t replacementprice: 949$v itemcallnumber: 949$o quantity: 949$k budget_code: 949$l Stage the attached bib-303.marcxml file Add to basket from the staged file Note that item prices are populated as '6.50' from 949$g Cancel Update MarcFieldsToOrder and map price to "020$c" Add to basket from the staged file Note the price is not populated, because 020$c contains a dollar sign Cancel Apply patch, restart all Add to basket from the staged file Note the price is now correctly populated from fallback to GetMarcPrice Note: GetMarcPrice does some automatic munging, that's why 020$c on it's own doesn't work - this could be done to fields in MarcFieldsToOrder/MarcItemFieldsToOrder but this would be an enhancement. This bug simply restores the previous behavious, but does it on the front end and is more obvious to the user Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrewfh@dubcolib.org 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=35892 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Depends on a NSO ? Blocked -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Removing dependencies on 35912 and 35913 - they are useful for testing, so that all order prices populate correctly, however, this is present from 23.05 and forward and others are not -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|35912, 35913 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35912 [Bug 35912] Item prices not populating order form when adding to a basket from a staged file https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35913 [Bug 35913] Item order prices do not fall back to MarcFieldsToOrder if not set by MarcItemFieldsToOrder -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36053 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161468|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 162643 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162643&action=edit Bug 35892: Populate order price using GetMarcPrice if no price specified Previously this happened after the fact, automagically, if no price was included in the order record. We should rather load the Marc price into the order form if we don't have a price form the '...ToOrder' system preferences To test: Setup -- Set systempreferences below MarcFieldsToOrder: price: 949$g quantity: 949$k budget_code: 949$l discount: 949$m sort1: 949$n sort2: 949$q MarcItemFieldsToOrder: homebranch: 949$a holdingbranch: 949$b itype: 949$y nonpublic_note: 949$x public_note: 949$z loc: 949$c ccode: 949$8 notforloan: 949$7 uri: 949$u copyno: 949$t replacementprice: 949$v itemcallnumber: 949$o quantity: 949$k budget_code: 949$l Stage the attached bib-303.marcxml file Add to basket from the staged file Note that item prices are populated as '6.50' from 949$g Cancel Update MarcFieldsToOrder and map price to "020$c" Add to basket from the staged file Note the price is not populated, because 020$c contains a dollar sign Cancel Apply patch, restart all Add to basket from the staged file Note the price is now correctly populated from fallback to GetMarcPrice Note: GetMarcPrice does some automatic munging, that's why 020$c on it's own doesn't work - this could be done to fields in MarcFieldsToOrder/MarcItemFieldsToOrder but this would be an enhancement. This bug simply restores the previous behavious, but does it on the front end and is more obvious to the user Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 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=35892 Sarah Cornell <sbcornell@cityofportsmouth.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sbcornell@cityofportsmouth. | |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.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=35892 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.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=35892 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.04 released in| | Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00,23.11.04 |24.05.00,23.11.04,23.05.10 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=39644 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org