You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Visit the Django admin area and click on "Timecards" under the "Hours" section.
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.
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.
Leave the "Hours Spent" field completely blank (this is the root cause of the server error)
Select any allocation percentage from the "Project allocation" dropdown and then attempt to save the form.
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:
Visit the Django admin area and click on "Timecards" under the "Hours" section.
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.
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.
Enter a zero (0) in the "Hours Spent" field
Select any allocation percentage form the "Project allocation" dropdown and then attempt to save the form.
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.
The text was updated successfully, but these errors were encountered:
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:
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:
We should create tests to cover these scenarios and implement the fixes.
The text was updated successfully, but these errors were encountered: