GNOME Bugzilla – Bug 119078
Incomplete math expressions should give error messages
Last modified: 2018-06-29 20:35:59 UTC
When entering a txn value from a register, if I enter a complete operation (e.g. 2+3), all is OK. On the contrary, if I leave the operation incomplete, the value disappears: entering "3+" or "3-", "3*" or "3/", the correct would be that gnucash mantain 3, while it puts 0.
Honestly, if you have an error in your math I do NOT believe it should second guess you. For example, what should it do if you put: 2+3+4+ I maintain the proper thing to do is either: a) pop up an error dialog and not let the user leave the cell, or b) save the result as 0 So, I'm not convinced the current behavior is wrong, although I admit it might not be the most user-friendly thing to do.
I imagine a situation in which I have been. I'm entering a txn whose last digit of the amount is 8, 9 or 6. It has happened quite often to me that, in the hurry to enter the txn in the numeric pad, after the last digit I involuntarialy hit the +, - or * key too. If gnucash puts a value of 0, it could happen that I get a discontrol in my balance, because I'm convinced that I entered the correct value, and nothing told me that gnucash put a 0 there! If besides that, I'm entering a txn with a past date, after saving it, this txn is buried back, and it could be more difficult for me to see the problem. All this leaves me better to your a) proposal, i.e. presenting an error dialog. Nevertheless, eliminating the last math sign would be a good alternative, because the problem arises mostly from situations like the one I've just described.
Okay, so the result here is that these incompleted math expressions should rather pop up an error messages instead of silently be interpreted as zero.
OK, that's a good solution!
Fixed in r13856, 1.9.6.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=119078. Please update any external references or bookmarks.