After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 119078 - Incomplete math expressions should give error messages
Incomplete math expressions should give error messages
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Register
1.8.x
Other Linux
: Normal enhancement
: ---
Assigned To: David Hampton
Chris Shoemaker
Depends on:
Blocks:
 
 
Reported: 2003-08-04 12:10 UTC by Paolo Benvenuto
Modified: 2018-06-29 20:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paolo Benvenuto 2003-08-04 12:10:15 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.
Comment 1 Derek Atkins 2003-08-04 22:39:04 UTC
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.
Comment 2 Paolo Benvenuto 2004-06-14 22:55:24 UTC
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.
Comment 3 Christian Stimming 2004-07-16 09:34:28 UTC
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.
Comment 4 Paolo Benvenuto 2004-07-16 17:40:08 UTC
OK, that's a good solution!
Comment 5 Josh Sled 2006-04-26 01:31:47 UTC
Fixed in r13856, 1.9.6.
Comment 6 John Ralls 2018-06-29 20:35:59 UTC
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.