[Bug 13352] New: Editing fund in Acquisitions causes error due to formatting
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Bug ID: 13352 Summary: Editing fund in Acquisitions causes error due to formatting Change sponsored?: --- Product: Koha Version: 3.16 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: cbrannon@cdalibrary.org QA Contact: testopia@bugs.koha-community.org If you edit a fund (aqbudgets.pl --> Edit --> Edit budget xxxx), the value is formatted with a comma. If you click save changes without changing anything, you get an error due to the formatting. You have to remove the comma. Either the value on the edit screen should not include the comma here, or better yet, it should accept the value with or without the comma. Koha should also be checked to see if this happens anywhere else. Christopher -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Editing fund in |Editing amount in |Acquisitions causes error |Acquisitions budget causes |due to formatting |error due to formatting -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 --- Comment #1 from Christopher Brannon <cbrannon@cdalibrary.org> --- (In reply to Christopher Brannon from comment #0)
If you edit a fund (aqbudgets.pl --> Edit --> Edit budget xxxx), the value is formatted with a comma. If you click save changes without changing anything, you get an error due to the formatting. You have to remove the comma.
Whoops. That should read: If you edit a budget (aqbudgets.pl --> Edit --> Edit budget xxxx), the value is formatted with a comma. If you click save changes without changing anything, you get an error due to the formatting. You have to remove the comma. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 13616 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Version|3.16 |3.18 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |12979 Version|3.18 |master Severity|minor |major Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 35517 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35517&action=edit Bug 13352: On editing, prices should not be formatted Bug 12979 refactored the way to display prices. The price format configuration was duplicated everywhere it was used. All calls looks good except the one in admin/aqbudgetperiods.pl In this one, the prices are formatted for an edition field (input). This means the input is incorrectly filled even if the user does not update the field. At the end, maybe should we manage formatted prices everywhere, even in inputs, but it's not in the scope of this bug. Technically, a new subroutine format_for_editing is added to the Koha::Number::Price module. It should be called everywhere a price is displayed in an input field. At the moment, it only does a sprintf("%.2f"), but it is a first step to let the number of decimals to display configurable. To test: 1/ Verify the issue described is fixed (editing a budget with a total amount > 1000 (With CurrencyFormat is US or FR). 2/ Verify you can edit a fund with a total amount > 1000 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paola.rossi@cineca.it Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35517|0 |1 is obsolete| | --- Comment #4 from Paola Rossi <paola.rossi@cineca.it> --- Created attachment 35703 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35703&action=edit [SIGNED OFF] Bug 13352: On editing, prices should not be formatted I've applied the patch against master 3.19.00.008 head 7904. Everything's OK as required by the test plan, with either FR or US CurrencyFormat syspref. So I pass the patch to the "Signed Off" status. NB1. The error message to fix is the following [blocking] one: "Form not submitted because of the following problem(s) - Amount must be a valid number, or empty" Editing a budgetperiod, the value 'hhh' in the budget's "Total-amount" input field gets the same error message [IMO RIGHT]. (A) Editing a fund, the 'hhh' in the fund's "Amount" input field doesn't get the message error, and sets the fund's amount to 0 [IMO WRONG]. This (A) error is the same against master, so IMO it's not related to this bug 13352. NB2. Editing a budgetperiod, "Save" brings back to "Budget Administration" [i.e. the budgets' list]. Editing a budgetperiod X, "Cancel" doesn't bring back to "Budget Administration": it brings to the "Funds for X". Is it OK? NB3. On editing the budget/fund, with the "FR" CurrencyFormat syspref the decimal mark was the dot, like with "US". The comma could be the decimal mark with "FR". -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Comment on attachment 35703 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35703 [SIGNED OFF] Bug 13352: On editing, prices should not be formatted Review of attachment 35703: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13352&attachment=35703) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ +462,5 @@
</li>
<li> <label for="budget_encumb">Warning at (%): </label> + <input type="text" name="budget_encumb" id="budget_encumb" value="[% budget_encumb | $Price on_editing => 1 %]" size="10" />
I think it's not needed here - this is a percentage, not a price. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35703|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 35724 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35724&action=edit [PASSED QA] Bug 13352: On editing, prices should not be formatted Bug 12979 refactored the way to display prices. The price format configuration was duplicated everywhere it was used. All calls looks good except the one in admin/aqbudgetperiods.pl In this one, the prices are formatted for an edition field (input). This means the input is incorrectly filled even if the user does not update the field. At the end, maybe should we manage formatted prices everywhere, even in inputs, but it's not in the scope of this bug. Technically, a new subroutine format_for_editing is added to the Koha::Number::Price module. It should be called everywhere a price is displayed in an input field. At the moment, it only does a sprintf("%.2f"), but it is a first step to let the number of decimals to display configurable. To test: 1/ Verify the issue described is fixed (editing a budget with a total amount > 1000 (With CurrencyFormat is US or FR). 2/ Verify you can edit a fund with a total amount > 1000 Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 35725 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35725&action=edit Bug 13352: QA Follow-up: Remove Price filter from "Warning at (%)" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Katrin Fischer from comment #7)
Created attachment 35725 [details] [review] Bug 13352: QA Follow-up: Remove Price filter from "Warning at (%)"
Looks consistent, thanks for the follow-up! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Status|Pushed to Master |Pushed to Stable --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be 3.18.4 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |Pushed to Master --- Comment #11 from Chris Cormack <chris@bigballofwax.co.nz> --- Doesn't apply cleanly on 3.18.x -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Chris Cormack from comment #11)
Doesn't apply cleanly on 3.18.x
I didn't try to reproduce on 3.18.x, but since bug 12979 is not in it, it should not be needed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi, I just tested on 3.18.3 - editing funds is ok, but the problem occurs for the budget. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 35894 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35894&action=edit [3.18.x] Bug 13352: On editing, prices should not be formatted Bug 12979 refactored the way to display prices. The price format configuration was duplicated everywhere it was used. All calls looks good except the one in admin/aqbudgetperiods.pl In this one, the prices are formatted for an edition field (input). This means the input is incorrectly filled even if the user does not update the field. At the end, maybe should we manage formatted prices everywhere, even in inputs, but it's not in the scope of this bug. Technically, a new subroutine format_for_editing is added to the Koha::Number::Price module. It should be called everywhere a price is displayed in an input field. At the moment, it only does a sprintf("%.2f"), but it is a first step to let the number of decimals to display configurable. To test: 1/ Verify the issue described is fixed (editing a budget with a total amount > 1000 (With CurrencyFormat is US or FR). 2/ Verify you can edit a fund with a total amount > 1000 Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 --- Comment #15 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 35895 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35895&action=edit [3.18.x] Bug 13352: QA Follow-up: Remove Price filter from "Warning at (%)" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 --- Comment #16 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Katrin Fischer from comment #13)
Hi, I just tested on 3.18.3 - editing funds is ok, but the problem occurs for the budget.
Yes, you are right, the patches are needed in 3.18.x (because of bug 12844). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13352 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #17 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be in 3.18.4 thanks for the 3.18.x patches Jonathan -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org