-
Notifications
You must be signed in to change notification settings - Fork 75
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
Adds ability to clear onboarding for a worker #886
Conversation
Codecov Report
@@ Coverage Diff @@
## main #886 +/- ##
==========================================
+ Coverage 64.65% 64.69% +0.04%
==========================================
Files 108 108
Lines 9312 9317 +5
==========================================
+ Hits 6021 6028 +7
+ Misses 3291 3289 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
ℹ️ This file allows for git to allow you to commit an empty folder. This assets folder is important for the tips cypress tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this feature!
The one thing I'd suggest though is that people using this may also want to be able to change/query by worker_name
rather than just by the id, as they may know the former and not the latter. Still, this is a great feature to have either way.
I changed it to query by worker name. I added a large comment in the script as what I am doing may be quite confusing. |
Looks fine to me, will let Jack chime in on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Agreed that the distinction between mephisto worker ids and worker names (which are usually the external IDs for a worker) is confusing. Unsure how to improve this at the moment.
The simplest solution to fix this would probably to rename "worker_id" to "worker_name" in the url, but that can be done in a separate pr. |
Overview
For development purposes it can be convenient to reset a worker's onboarding qualifications. Now it is possible!
Changes:
clear_onboarding(self, worker: "Worker", qualification_name: str):
toonboarding_required.py
as a class method.clear_worker_onboarding.py
script that can used to clear a worker's onboarding qualifications.mephisto scripts local_db clear_worker_onboarding
in the console.Video:
clear_onboarding.mp4
This video shows how the script can be used to clear a worker's onboarding. Worker x gets the onboarding qualification granted when he presses the button. After the script is ran, the worker is taken back to the onboarding page as the script revoked the onboarding qualification.
Resolves #790