Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Fix for #2031 #2336

wants to merge 9 commits into from

Conversation

daraul
Copy link
Contributor

@daraul daraul commented Apr 15, 2024

This patch includes a solution for #2031, but also causes two tests to fail, that don't fail on the master branch:

  • 55 - BaselineTest_feat-balance_assert_split (Failed)
  • 378 - RegressTest_ACE05ECE (Failed)

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.

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.
@daraul
Copy link
Contributor Author

daraul commented Apr 15, 2024

@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 RegressTest_ACE05ECE outlines is actually expected -- are time entries all expected to be made to virtual accounts?

It'd also be nice if you could point me to documentation on the postings in BaselineTest_feat-balance_assert_split that I believe to be virtual -- they have an account with a name that starts with the '<' character, which I've been unable to find mentioned in the docs.

@tbm
Copy link
Contributor

tbm commented Apr 17, 2024

Unfortunately don't know anything about this. @jwiegley can you comment on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants