GNOME Bugzilla – Bug 759610
Variables in scheduled transactions replaced by 0 when evaluated
Last modified: 2018-06-29 23:45:04 UTC
When entering formulas for scheduled transactions, some variables are replaced by 0 and behave strangely. Some examples with x = 10: (x * 10) + (10) = 10 (x * 10) - (10) = -10 (x * 10) + (-10) = -10 (x + 1) * 10 = 10 (x * 10) + (x * 1) = 110 Ubuntu 14.04 -- GnuCash 2.6.4 To reproduce: 1) Schedule a new transaction using one of the above formulas or some similar formula as a debit or credit amount. 2) Run that transaction.
(In reply to zach.inbox from comment #0) > When entering formulas for scheduled transactions, some variables are > replaced by 0 and behave strangely. > > Some examples with x = 10: > > (x * 10) + (10) = 10 > (x * 10) - (10) = -10 > (x * 10) + (-10) = -10 > (x + 1) * 10 = 10 > (x * 10) + (x * 1) = 110 > > Ubuntu 14.04 -- GnuCash 2.6.4 > > To reproduce: > 1) Schedule a new transaction using one of the above formulas or some > similar formula as a debit or credit amount. > 2) Run that transaction. Correction, running Ubuntu 15.04
Created attachment 317590 [details] Test file that shows the behavior I was able to reproduce this in both 2.4.x and 2.6.5 (I don't have a current 2.6.9/maint/master built to test). I've attached a simple file that shows the behavior. Load the file, then Actions -> Since Last Run. Assign "10" to x and then click on "view" to see the transactions that get created. It should be 101.00, (x*10)+1 but it only shows $1.
This looks like it might be a variation on bug 680104.
Yup, it's a dup. *** This bug has been marked as a duplicate of bug 680104 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=759610. Please update any external references or bookmarks.