-
Notifications
You must be signed in to change notification settings - Fork 8
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
Dds 1691 -- New API endpoint to extend the deadline: ProjectStatus.patch
#1480
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1480 +/- ##
==========================================
+ Coverage 90.19% 90.32% +0.12%
==========================================
Files 29 29
Lines 4426 4484 +58
==========================================
+ Hits 3992 4050 +58
Misses 434 434
|
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.
Am I understanding it correctly if I say you're aiming at this being the full flow for the CLI and API?
- CLI: call
ProjectStatus.get
- API:
ProjectStatus.get
returns project status and deadline - CLI: Print project status, deadline, and chosen new deadline. Ask for confirmation.
- CLI: call
ProjectStatus.patch
- API:
ProjectStatus.patch
verifies correct status, and ok deadline, and extends the deadline.
If so, also add this to the PR description so that it's easier to work on the CLI command part. If not add the correct imagined steps to the PR description 🙏🏻
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
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.
A few minor things
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
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.
Looking good, need some small adjustments though - e.g. change from days_in_expired
to days_in_available
and a change in an error message for the users
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
Co-authored-by: Ina Odén Österbo <[email protected]>
ProjectStatus.patch
@rv0lt So since the new statuses added to the new_status_row = self.expire_project(
project=project,
current_time=curr_date - <1 second here>,
deadline_in=project.responsible_unit.days_in_expired,
) ? Or if we should add checks in the tests that you have added that verifies that Also, currently we set (example above) |
|
Great. Do that.
|
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 the tests pass now, this PR is approved and you can merge!
Read this before submitting the PR
If there is a field which you are unsure about, enter the edit mode of this description or go to the PR template; There are invisible comments providing descriptions which may be of help.
1. Description / Summary
Implemented the functionality in the API of extend the deadline for a project with a new endpoint:
The new endpoint is PATCH /proj/status
Currently, it only supports the functionality of extending the deadline for which the following body is necessary:
If, new_deadline_in has not been provided then, nothing is executed. If it is provided, it needs to be an integer that defines the extension in days for the new deadline. These days while be added on top of the current day's left.
The workflow process that should be handled when project status extend deadline is called is as follows:
2. Jira task / GitHub issue
Link to the github issue or add the Jira task ID here.
3. Type of change
What type of change(s) does the PR contain?
Check the relevant boxes below. For an explanation of the different sections, enter edit mode of this PR description template.
4. Additional information
master
branch: _If checked, read the release instructions5. Actions / Scans
Check the boxes when the specified checks have passed.
For information on what the different checks do and how to fix it if they're failing, enter edit mode of this description or go to the PR template.