Summary: | Allow validation of price related item fields | ||
---|---|---|---|
Product: | Koha | Reporter: | Chris Nighswonger <cnighswonger> |
Component: | Cataloging | Assignee: | Chris Nighswonger <cnighswonger> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | castro8583bennett, esther.melander, jesse, tmisilo, veron, wizzyrea |
Version: | Main | ||
Hardware: | PC | ||
OS: | All | ||
URL: | cgi-bin/koha/cataloguing/additem.pl | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=2542 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Chris Cormack
2010-05-21 00:53:44 UTC
This is still a bug in 3.8. Data validation of entry in 'price' fields is currently not done. I think dates should be validated as well. With current master (3.19.00.016) it is possible to enter something like 'blablabla' or '2004' in 'd - Date acquired' and 'w - Price effective from'. Both result to a value '0000-00-00' in the data table. Wondering if this is part of this bug? We are seeing when we put a price in for the original purchase price it gets saved as a 1 when the value has a comma in it. For example Edit an item, add 1,345.80 and click save. It gets saved as a 1. If you enter 1345.80 it saves correctly. (In reply to Jesse Maseto from comment #4) > Wondering if this is part of this bug? > > > > We are seeing when we put a price in for the original purchase price it gets > saved as a 1 when the value has a comma in it. > > > > For example > > > > Edit an item, add 1,345.80 and click save. It gets saved as a 1. If you > enter 1345.80 it saves correctly. Hi Jesse, I think this is more related to bug 12310, bug 18723 and bug 19521. Koha doesn't always work well with commas. (In reply to Katrin Fischer from comment #5) > Koha doesn't always work well with commas. Hi Katrin so what do you suggest? Castro B, https://sparpedia.no For now I suggest always using the format: 12.00 and avoid commas when entering monetary information in any spot in Koha. Long term I'd like us to support different formats, like we do for dates for example. There are 2 different opinions discussed here: one is an apporach to allow to enter in different formats and have Koha parse what it means. The other is have the input format follow the display format. And yes, validation would be nice. I was just saying that entering data , should be avoided for now to avoid bad behaviour. Validation for dates exists now, so we can reduce this bug report to prices. To be clear, would this bug validate the 952$g (Cost, normal purchase price) and 952$v (Cost, replacement price)? Bug 34169 added validation of monetary fields in acquisitions, but it did not include the item form used in acquisitions. In general it would be nice if it was included both in acquisitions and when editing/adding an item record to a bibliographic record. (In reply to Esther Melander from comment #9) > To be clear, would this bug validate the 952$g (Cost, normal purchase price) > and 952$v (Cost, replacement price)? > > Bug 34169 added validation of monetary fields in acquisitions, but it did > not include the item form used in acquisitions. In general it would be nice > if it was included both in acquisitions and when editing/adding an item > record to a bibliographic record. In another four years this bug will turn 20... wow! I really do not recall much of anything about this as it has been so long. Reading back, it appears that work I did for LL never made it into the public repo. Sad. Maybe someone currently working on the project can comment. |