-
Notifications
You must be signed in to change notification settings - Fork 37
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
Possible bug? Blank timecard entries in timecard reports #1710
Comments
Might be related: #1458 |
Some research notes: This situation has always been present in the Tock database since the earliest days. But, changes made in October 2021 to introduce weekly billing made it MUCH more common.
|
Unfortunately there are many different code paths that affect this. https://github.com/18F/tock/blob/main/tock/hours/forms.py#L285 appears to be trying to raise an error that would disallow having timecardobject entries where both https://github.com/18F/tock/blob/main/tock/hours/forms.py#L298 appears to be trying to remove line items from submitted time cards that had 0 hours spent and 0 project allocation. But, as above, that condition can never be true so those items don't get removed. |
Finally, there's a commented test here https://github.com/18F/tock/blob/main/tock/hours/tests/test_forms.py#L285-L298 that appears to have been removed when we were adding weekly billing, but never fixed or added back. But, strangely enough https://github.com/18F/tock/blob/main/tock/hours/tests/test_forms.py#L275-L283 is an explicit test that putting 0 hours_spent for a project IS a valid timecard entry. Unfortunately that test doesn't specify why it should be valid. Is it because it should be okay so that it can trigger the |
One of the hardest things about solving this problem is that I don't think that we have a UX design for what SHOULD happen when "empty" timecard entries are submitted. There are clues in this historical code about what people thought should happen at different times, but no clear design for what should occur. The lack of design research resources for Tock can make it particularly hard to address bugs like this without just guessing what employee users AND data-analysis users want. |
I pushed a branch exploring this at https://github.com/18F/tock/tree/nmb/zero-hours It fixes the string type comparison with project_allocation and adds a test case for the error message that is never triggered. It also makes a few more test cases fail because it changes the existing behavior with 0 entries.
|
While using timecard data for the project reflections analysis, I noticed many entries that looked like this, where there would be 0 hours billed and 0% allocation:
I am unsure what would cause this, how this would be used, or if this is a straight up bug. I assume this would happen if a person submitted a tockline but kept it empty.
My assumption is this is a bug that would be corrected by not allowing empty entries.
Submitting this for other eyes and thoughts.
The text was updated successfully, but these errors were encountered: