-
Notifications
You must be signed in to change notification settings - Fork 5
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
Introduce Final Output and Auto Lock Tasks Fields to Improve Task Management #125
Conversation
for more information, see https://pre-commit.ci
src/backend/app/db/db_models.py
Outdated
@@ -129,7 +130,10 @@ class DbProject(Base): | |||
), | |||
) | |||
author = relationship(DbUser, uselist=False, backref="user") | |||
|
|||
final_output = cast( |
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.
this is the multiselect option. We might need an array field ?
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’ve updated the schema & field to use an array field to better handle multiple selections.
for more information, see https://pre-commit.ci
src/backend/app/db/db_models.py
Outdated
@@ -129,7 +130,8 @@ class DbProject(Base): | |||
), | |||
) | |||
author = relationship(DbUser, uselist=False, backref="user") | |||
|
|||
final_output = cast(list, Column(ARRAY(Enum(FinalOutput)))) | |||
auto_lock_tasks = cast(bool, Column(Boolean, default=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.
It is better to rename this auto_lock_tasks
to something like requires_approval_from_manager_for_locking
.
Fields should be named clearly.
Summary:
This PR introduces two new fields,
final_output
andauto_lock_tasks
, to theDbProject
model and addresses issues with specific API endpoints. Thefinal_output
field allows for storing the desired output format for a project, enhancing flexibility and clarity in project configurations. Theauto_lock_tasks
field provides project creators with the option to enable or disable automatic task locking, giving more control over task management.New Features:
1. Added
final_output
Field:final_output
field in theDbProject
model to store the output format (To store the desired output format for a projec).2. Added
auto_lock_tasks
Field:auto_lock_tasks
field to define whether task auto-locking is optional for the project creator.Issue Fixes:
1. Fixed Delete Project Endpoint:
/api/projects/{project_id}
2. Fixed Get Pending Requested Tasks Endpoint:
/api/tasks/requested_tasks/pending