-
Notifications
You must be signed in to change notification settings - Fork 449
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
Enhancement : Require mentor's approval for task completion #1130
base: develop
Are you sure you want to change the base?
Enhancement : Require mentor's approval for task completion #1130
Conversation
You'll also need to add migrations |
@epicadk can you please tell me how to add that? |
I believe @mtreacy002 was going to create a doc for this? |
@epicadk , IMO @RiddhiAthreya doesn't need to write a migration script here since the changes applies to dao object of Task and the logic used inside Task db model. The Task db model itself doesn't get affected with the changes here. I tried running flask db migrate and got the response below. Let me know if you have a different view on this 😉 |
@mtreacy002 true , only the task json object has changed, but the task table remains the same 😃 |
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.
@RiddhiAthreya I see this will work but how the mentor is going to approve the task??
Also, we need some test cases for this too
if 'requires_approval' in data.keys(): | ||
requires_approval = data['requires_approval'] | ||
else: | ||
requires_approval = False |
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.
if 'requires_approval' in data.keys(): | |
requires_approval = data['requires_approval'] | |
else: | |
requires_approval = False | |
requires_approval = data.get('requires_approval') or False |
@RiddhiAthreya any updates? |
Description
Task has got new property requires_approval: [bool]. If it's set to True during creation, task becomes "restricted" - i.e only mentor can mark it as done/completed. When mentee tries to mark it as done, he get's 401 Unauthorized.
Fixes #278
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
When a mentee tries to update a task which has
requires_approval
set to Truecreating a task with
required_approval
set to TrueWhen mentor tries to update a task which has requires_approval set to True
Checklist:
Code/Quality Assurance Only