[GNC-dev] Two steps forward (Maybe three back)
Christopher Lam
christopher.lck at gmail.com
Sun Jan 20 23:07:12 EST 2019
There's no reason why the dates can't be changed.
The reason dates straggling 1.1.1970 was chosen was because 1.1.1970
corresponds to time 0 in time64, and I felt that having a few negative
time64 numbers would be interesting to test sorting.
However this is a weird weirdness -- the test output shows that the
transactions were sorted correctly - 31/12/69, 31/12/69, 01/01/70,
02/01/70, 02/10/70 (in d/m/y); it's just the display that is incorrect.
Moreover the display has to go through qof_print_date which takes a
time64 and returns a string.
I'd be keen to know Stephen's build and try debug this.
Stephen can you modify transaction.scm as follows and let us know the
test output? (Beware the parentheses!)
modified gnucash/report/standard-reports/transaction.scm
@@ -1119,7 +1119,8 @@ be excluded from periodic reporting.")
(if transaction-row?
(gnc:make-html-table-cell/markup
"date-cell"
- (qof-print-date (xaccTransGetDate
(xaccSplitGetParent split))))
+ (let ((date (xaccTransGetDate
(xaccSplitGetParent split))))
+ (gnc:pk 'date date
'qof-print-date (qof-print-date date))))
""))))
(add-if (column-uses? 'reconciled-date)
On 21/1/19 7:00 am, John Ralls wrote:
>
>> On Jan 20, 2019, at 1:24 PM, Stephen M. Butler <kg7je at arrl.net> wrote:
>>
>> Started clean this morning by recloning the git repository. Made much
>> further progress but ended up with some test failures. Here are my steps:
>>
>> 1. sudo rm -rf gnucash
>>
>> 2. git clone https://github.com/Gnucash/gnucash
>>
>> 3. cd gnucash
>>
>> 4. git checkout -b debian
>>
>> 5. cp -r ../debian .
>>
>> Here is the contents of that directory -- copied to Google Drive:
>>
>>
>> https://drive.google.com/open?id=1VJmtb-Fx00PQna4yQoYm49C88Bi0hneI
>>
>> 6. git add debian
>>
>> 7. git commit
>>
>> Done on my "debian" branch
>>
>> 8. fakeroot debian/rules clean
>>
>> 9. sudo mk-build-deps -ir debian/control
>>
>> 10. dpkg-buildpackage -rfakeroot -b -uc
>>
>> Note: This usually failed right up front. This time went for nearly 10
>> minutes.
>>
>> End testing: Jan 20 12:49 PST
>> + exit 2
>> debian/rules:68: recipe for target 'override_dh_auto_test' failed
>> make[1]: *** [override_dh_auto_test] Error 2
>> make[1]: Leaving directory '/home/steve/Projects/GnuCash/gnucash'
>> debian/rules:23: recipe for target 'build' failed
>> make: *** [build] Error 2
>> dpkg-buildpackage: error: debian/rules build subprocess returned exit
>> status 2
>>
>>
>> Here are the contents of ./.build/Testing/Temporary/*
>> https://drive.google.com/open?id=1_0gRAd-ymP1cEYM3pyPnvzeHI7-SSWMS
> The file you want to look at for test failures is LastTest.log. You can search for "Test Failed".
>
> This time the test failure is in gnucash/report/standard-reports/test/test-transaction.scm:
> [pass] line:654, test: dual amount column, first transaction correct
> [fail] line:678, test: dates are sorted
> transaction.scm/sorting options
> -> expected: ("12/31/69" "12/31/69" "01/01/70" "02/01/70" "02/10/70")
> -> obtained: ("12/31/70" "12/31/70" "01/01/70" "02/01/70" "02/10/70")
> [pass] line:684, test: sort by number
>
> That suggests that for some reason Guile on your system can't handle dates before 1/1/1970. That's strange, but probably not important to many GnuCash users.
>
> Chris Lam, any reason not to change that test to use later dates?
>
> Regards,
> John Ralls
>
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
More information about the gnucash-devel
mailing list