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

Weekly billing TimecardObject server error and hourly validation issue #1365

Closed
caleywoods opened this issue Oct 1, 2021 · 2 comments
Closed
Assignees

Comments

@caleywoods
Copy link
Contributor

This issue is capturing two problems that are related within the Django admin interface when editing a users previously saved Timecard with a weekly billing project or attempting to add one.

The first issue is that when you first enter a saved timecard and this timecard either already has a weekly billing project that you need to edit or you're adding a new weekly billing project, the "hours spent" column is completely empty and if you don't type a zero into that field before hitting save you will encounter a server error. The reproduction steps for local tock are as follows:

  1. Visit the Django admin area and click on "Timecards" under the "Hours" section.
  2. Click "Add Timecard" in the upper right and then pick a user and reporting period at the top of the form. You may need to create a new reporting period if you don't have one open.
  3. In the Timecard Objects area of the form, select a weekly billed project from the list. If you've loaded your test database recently you can use project "125 - Weekly Billing Test", if you don't have a weekly billed project, please create one and come back to this process.
  4. Leave the "Hours Spent" field completely blank (this is the root cause of the server error)
  5. Select any allocation percentage from the "Project allocation" dropdown and then attempt to save the form.
  6. Observe that you should have encountered a server error telling you that it encountered a TypeError.

The second issue is that we're still attempting to validate that a user is working 40 hours on their timecard when a weekly billed project exists. To reproduce this issue:

  1. Visit the Django admin area and click on "Timecards" under the "Hours" section.
  2. Click "Add Timecard" in the upper right and then pick a user and reporting period at the top of the form. You may need to create a new reporting period if you don't have one open.
  3. In the Timecard Objects area of the form, select a weekly billed project from the list. If you've loaded your test database recently you can use project "125 - Weekly Billing Test", if you don't have a weekly billed project, please create one and come back to this process.
  4. Enter a zero (0) in the "Hours Spent" field
  5. Select any allocation percentage form the "Project allocation" dropdown and then attempt to save the form.
  6. Observe that you should be instructed to correct an error and that warns you that you've entered fewer than 40 hours just below the Timecard Objects section of the form.

We should create tests to cover these scenarios and implement the fixes.

@caleywoods
Copy link
Contributor Author

Resolved by #1366

@colinmurphy01
Copy link
Member

Tested with Chris Manger in staging and it seems to be resolved from a UAT perspective.

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

No branches or pull requests

2 participants