-
Notifications
You must be signed in to change notification settings - Fork 175
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
[API] Visit patch request to start next stage #7479
Conversation
71f9e63
to
9291868
Compare
b96a53b
to
bf6caa1
Compare
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 think we should find a solution that will allow to go from "Not started" to"In Progress" and also from "In Progress" to "Pass" or any other valid status. The get request returns a "Stages" with a property fro each stages.
"Stages": {
"Screening": {
"Date": "string",
"Status": "Pass"
}
}
I think that a PATCH request with a similar object in the body could handle more types of transitions. Also, the frontend ask if scans were acquired, maybe we should add that.
339dc1a
to
98c77ce
Compare
98c77ce
to
8828f69
Compare
8828f69
to
a0766f2
Compare
@xlecours My intuition is that implementing a solution to switch from In Progress to Pass implies some checks that I'm not familiar with. It's probably the same for Withdrawal and maybe Failure. This PR covers the functionality I need for a particular project, I may not have time to address your suggestion before a while. |
I agree with Xavier that it would be better to infer it from the same structure based on what stages are set in
For the sake of starting a next stage, handling a |
@driusan Leaving some cases Not Implemented is a really good idea to address Xavier's suggestion in a limited time frame. I will do that shortly. |
modules/api/php/endpoints/candidate/visit/visit_0_0_4_dev.class.inc
Outdated
Show resolved
Hide resolved
modules/api/php/endpoints/candidate/visit/visit_0_0_4_dev.class.inc
Outdated
Show resolved
Hide resolved
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 should also modify modules/api/static/schema.yml
. I can push a contribution if you would like me to.
I am not modifying v0.0.3 so do we need to change anything? |
You are right. Let's add a new file then. |
371e993
to
6fefe62
Compare
118bfbe
to
f710b17
Compare
``` | ||
will update the stages date and status. | ||
|
||
At this moment, we only support requests for the Visit stage with the In progress status, |
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's not clear to me what this means for the other fields. Should they be left out of the request? Included with garbage data?
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 removed Approval and Screening from the request.
Re-review requested a week ago.
Co-authored-by: Xavier Lecours <xavier.lecours@mcin.ca>
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 have tested it. It works all right. It's just that an empty array as a response is not ideal. I will approve this in its current state but it should return and empty response with a 204 status code.
modules/api/php/endpoints/candidate/visit/visit_0_0_4_dev.class.inc
Outdated
Show resolved
Hide resolved
laemtl#34 sent |
removing checks and handling of other stages Adding a NoContent response
Patch request url: /candidates/CandID/Visit
Patch request format:
This will only 'start next stage' when 1. the payload contains a "Visit" stage with "In Progress" as Status 2. The current status of the Visit stage is "Not Started".