-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for #2031 #2336
base: master
Are you sure you want to change the base?
Fix for #2031 #2336
Conversation
I'm not actually sure the test command's output is correct.
This seems to work just fine. Therefore I think the problem is in the balance assignment logic.
This adds a new flag to the post class(?) to state whether the posting is for a timelog entry. Then the class' must_balance method is updated to take that flag in to account. Finally, the timelog file is updated to create postings with that flag set, allowing them to avoid the balance requirement.
@tbm can you help me out here? I think that I understand why the two tests failed, but I'm not certain the behavior that It'd also be nice if you could point me to documentation on the postings in |
Unfortunately don't know anything about this. @jwiegley can you comment on this? |
This patch includes a solution for #2031, but also causes two tests to fail, that don't fail on the master branch:
What I found happening is that time log entries were treated as virtual postings, but I am not sure if that is the intended way to treat them, or just a workaround to ensure they can get past the usual requirement that a posting should balance -- my solution assumes the latter.
My solution therefore adds a new flag to state whether a posting is for a time log entry, and thereby returns false from the post class'
must_balance
method, when that flag is set on the posting.The two tests that fail include a virtual(?) posting that I have never seen before (and cannot find mentioned in the docs), and a time log entry that is asserted to have been posted to a virtual account.