[Bug 20922] New: Koha::Number::Price must not be used in updatedatabase.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Bug ID: 20922 Summary: Koha::Number::Price must not be used in updatedatabase.pl Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: critical Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org
From the koha-devel list:
http://lists.koha-community.org/pipermail/koha-devel/2018-June/044608.html 16.06.00.042 Upgrade to 16.06.00.041 done (Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher) DBD::mysql::st execute failed: Unknown column 'me.p_sep_by_space' in 'field list' [for Statement "SELECT `me`.`currency`, `me`.`symbol`, `me`.`isocode`, `me`.`timestamp`, `me`.`rate`, `me`.`active`, `me`.`archived`, `me`.`p_sep_by_space` FROM `currency` `me` WHERE ( `active` = ? )" with ParamValues: 0=1] at /usr/local/share/perl/5.24.1/DBIx/Class/Storage/DBI.pm line 1836. DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'me.p_sep_by_space' in 'field list' at /inlibro/git/koha-csf-prod-inlibro/Koha/Objects.pm line 209 Basically, the update code uses Koha::Number::Price, which in full modern object mode goes for its newly added *p_sep_by_space* _in the 18.05 code_. But the DB doesn't have it yet (it comes with 17.12.00.022). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |4078, 13321 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4078 [Bug 4078] Add the ability to customize and display the symbol for a currency https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13321 [Bug 13321] Fix tax and prices calculation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 76006 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76006&action=edit Bug 20922: Remove use of Koha::Number::Price in updatedatabase.pl Koha::Number::Format->round use Number::Format->round with a precision=2 We should use it directly instead of Koha::* modules. It will avoid the DB entry to fail because schema changes.
From the koha-devel list:
http://lists.koha-community.org/pipermail/koha-devel/2018-June/044608.html 16.06.00.042 Upgrade to 16.06.00.041 done (Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher) DBD::mysql::st execute failed: Unknown column 'me.p_sep_by_space' in 'field list' [for Statement "SELECT `me`.`currency`, `me`.`symbol`, `me`.`isocode`, `me`.`timestamp`, `me`.`rate`, `me`.`active`, `me`.`archived`, `me`.`p_sep_by_space` FROM `currency` `me` WHERE ( `active` = ? )" with ParamValues: 0=1] at /usr/local/share/perl/5.24.1/DBIx/Class/Storage/DBI.pm line 1836. DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'me.p_sep_by_space' in 'field list' at /inlibro/git/koha-csf-prod-inlibro/Koha/Objects.pm line 209 Basically, the update code uses Koha::Number::Price, which in full modern object mode goes for its newly added *p_sep_by_space* _in the 18.05 code_. But the DB doesn't have it yet (it comes with 17.12.00.022). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |19789 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19789 [Bug 19789] Remove some indirect DBIx calls from updatedatabase -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19789 Depends on|19789 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19789 [Bug 19789] Remove some indirect DBIx calls from updatedatabase -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Blou <philippe.blouin@inlibro.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=20922 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76006|0 |1 is obsolete| | --- Comment #2 from Blou <philippe.blouin@inlibro.com> --- Created attachment 76010 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76010&action=edit Bug 20922: Remove use of Koha::Number::Price in updatedatabase.pl Koha::Number::Format->round use Number::Format->round with a precision=2 We should use it directly instead of Koha::* modules. It will avoid the DB entry to fail because schema changes.
From the koha-devel list:
http://lists.koha-community.org/pipermail/koha-devel/2018-June/044608.html 16.06.00.042 Upgrade to 16.06.00.041 done (Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher) DBD::mysql::st execute failed: Unknown column 'me.p_sep_by_space' in 'field list' [for Statement "SELECT `me`.`currency`, `me`.`symbol`, `me`.`isocode`, `me`.`timestamp`, `me`.`rate`, `me`.`active`, `me`.`archived`, `me`.`p_sep_by_space` FROM `currency` `me` WHERE ( `active` = ? )" with ParamValues: 0=1] at /usr/local/share/perl/5.24.1/DBIx/Class/Storage/DBI.pm line 1836. DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'me.p_sep_by_space' in 'field list' at /inlibro/git/koha-csf-prod-inlibro/Koha/Objects.pm line 209 Basically, the update code uses Koha::Number::Price, which in full modern object mode goes for its newly added *p_sep_by_space* _in the 18.05 code_. But the DB doesn't have it yet (it comes with 17.12.00.022). Signed-off-by: Blou <philippe.blouin@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 --- Comment #3 from Blou <philippe.blouin@inlibro.com> --- I applied the patch and upgrade from 3.0 to 17.12.00.044 with success. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76010|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 76022 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76022&action=edit Bug 20922: Remove use of Koha::Number::Price in updatedatabase.pl Koha::Number::Format->round use Number::Format->round with a precision=2 We should use it directly instead of Koha::* modules. It will avoid the DB entry to fail because schema changes.
From the koha-devel list:
http://lists.koha-community.org/pipermail/koha-devel/2018-June/044608.html 16.06.00.042 Upgrade to 16.06.00.041 done (Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher) DBD::mysql::st execute failed: Unknown column 'me.p_sep_by_space' in 'field list' [for Statement "SELECT `me`.`currency`, `me`.`symbol`, `me`.`isocode`, `me`.`timestamp`, `me`.`rate`, `me`.`active`, `me`.`archived`, `me`.`p_sep_by_space` FROM `currency` `me` WHERE ( `active` = ? )" with ParamValues: 0=1] at /usr/local/share/perl/5.24.1/DBIx/Class/Storage/DBI.pm line 1836. DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'me.p_sep_by_space' in 'field list' at /inlibro/git/koha-csf-prod-inlibro/Koha/Objects.pm line 209 Basically, the update code uses Koha::Number::Price, which in full modern object mode goes for its newly added *p_sep_by_space* _in the 18.05 code_. But the DB doesn't have it yet (it comes with 17.12.00.022). Signed-off-by: Blou <philippe.blouin@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Makes total sense and works as prescribed.. a simple patch really, passing qa. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 --- Comment #9 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x for 17.05.13 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20922 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org