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

New timecards must be set to their user's organization and business unit #1126

Closed
4 tasks done
Jkrzy opened this issue Jun 26, 2020 · 3 comments · Fixed by #1129
Closed
4 tasks done

New timecards must be set to their user's organization and business unit #1126

Jkrzy opened this issue Jun 26, 2020 · 3 comments · Fixed by #1129
Assignees
Labels

Comments

@Jkrzy
Copy link
Contributor

Jkrzy commented Jun 26, 2020

Upon creation, Timecards should have their organization and unit values set to the current values for their associated Employee(UserData)

We have ~2 weeks of timecards which did not have their org and unit values set as expected, they will also need to be remedied.

We'll know we're done when

  • Timecards have organization and business unit set on creation
  • Timecards organization and business unit are not modified on save
  • We have a test case covering this functionality
  • We've created a migration or otherwise corrected timecards with no organization/unit set.
@Jkrzy Jkrzy added the bug label Jun 26, 2020
@Jkrzy
Copy link
Contributor Author

Jkrzy commented Jun 26, 2020

Looked into this one a bit -- looks like timecards are being set to their expected org and unit on creation. Unless there's another creation path I'm missing

https://github.com/18F/tock/compare/timecard-creation?expand=1

@Jkrzy
Copy link
Contributor Author

Jkrzy commented Jun 30, 2020

And on even closer inspection, timecards on production are definitely not having their expected org and unit set on creation. Visible by inspecting Timecards created for 18F folks covering this week's reporting period

@Jkrzy
Copy link
Contributor Author

Jkrzy commented Jul 2, 2020

We’re using the TimecardForm when timecards are submitted, but not submitting organization/unit with the inbound POST data. Soooooo, we should exclude those fields in the form preventing them from being overwritten.

https://github.com/18F/tock/blob/v20200618.1/tock/hours/forms.py#L39

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

Successfully merging a pull request may close this issue.

1 participant