-
Notifications
You must be signed in to change notification settings - Fork 13
#1953 - Request an Offering Change - DB Migrations #1995
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
Conversation
...ns/src/sql/ApplicationOfferingChangeRequests/Create-application-offering-change-requests.sql
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,2 @@ | |||
| -- DROP Table | |||
| DROP TABLE IF EXISTS sims.application_offering_change_requests; No newline at end of file | |||
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.
...b-migrations/src/migrations/1686094364995-CreateApplicationOfferingRequestsAndStatusTypes.ts
Outdated
Show resolved
Hide resolved
...apps/db-migrations/src/sql/Types/Create-application-offering-change-request-status-types.sql
Show resolved
Hide resolved
...ces/packages/backend/libs/sims-db/src/entities/application-offering-change-requests.model.ts
Outdated
Show resolved
Hide resolved
...ns/src/sql/ApplicationOfferingChangeRequests/Create-application-offering-change-requests.sql
Show resolved
Hide resolved
andrepestana-aot
left a comment
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.
Great job. Left minor comments and one for my knowledge. Thanks!
...ns/src/sql/ApplicationOfferingChangeRequests/Create-application-offering-change-requests.sql
Outdated
Show resolved
Hide resolved
| id SERIAL PRIMARY KEY, | ||
| application_id INT NOT NULL REFERENCES sims.applications(id), | ||
| change_offering_id INT NOT NULL REFERENCES sims.education_programs_offerings(id), | ||
| active_offering_id INT NOT NULL REFERENCES sims.education_programs_offerings(id), |
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.
Should we keep the active_offering_id in the table or just use the one from the current assessment?
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.
mm, that makes sense. I was following the DB structure from the analysis ticket. @andrepestana-aot @dheepak-aot @guru-aot thoughts?
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 already had a discussion, the thought of having the oactive offering id is when we create a componenet which shows both the offeringside byside, the requirement for it would be pass the 2 offering id's and it should render. Yes we can use the current_assessment, but again do we need to go through the application-> current_assessment->offering_id every time? I am okay with not having the offering id explicitly too, but looking at the row in the table can give the active and changed offering directly. Just my thoughts
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.
We do not build the DB and API based on how the UI will work, right?
Yes @guru-aot I remember the conversation and I did not remember the output of it.
My point goes beyond saving the current offering id or not. What happens if between the request and the Ministry approval the application went through another reassessment? The real concern is that we would be copying the offering id from the current assessment into this table only to make it better for the UI.
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 get your point. Does a reassessment happens inbetween? Is that a valid scenario? IF yes, dont we need to stop the reassessment from happening?
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 reassessment can happen? Yes.
Can it change the Offering Id? Maybe.
Should we stop it? I am not sure.
Either way, should we have the offering id in both places?
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.
@andrewsignori-aot @guru I read through the conversations, and I strongly feel that we need to we need to have active_offering_id here for the sake of accuracy of the application_offering_change_record.
Assume the following scenario without active_offering_id
An application with applicationId 100 and offeringId 8
application_offering_change_id ----> applicationId - 100, requested_offering_id-10, status-approved
(Consider that this application offering change is approved.)
The application might go through a re-assessment and get associated to an offering 12 later.
If that is the case, then this application offering change record data will say that the offering change happened from offering 12 to offering 10 which is not accurate. I am talking from the data perspective.
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.
keeping as it is and as discussed will confirm with @JasonCTang and will update in next PR
...ns/src/sql/ApplicationOfferingChangeRequests/Create-application-offering-change-requests.sql
Outdated
Show resolved
Hide resolved
...ns/src/sql/ApplicationOfferingChangeRequests/Create-application-offering-change-requests.sql
Outdated
Show resolved
Hide resolved
| CREATE TABLE sims.application_offering_change_requests ( | ||
| id SERIAL PRIMARY KEY, | ||
| application_id INT NOT NULL REFERENCES sims.applications(id), | ||
| change_offering_id INT NOT NULL REFERENCES sims.education_programs_offerings(id), |
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 know i created the DB column names :) , but I feel it would be better to have change_offering_id as requested_offering_id? Thoughts? @andrewsignori-aot @dheepak-aot @andrepestana-aot @sh16011993
...ackages/backend/libs/sims-db/src/entities/application-offering-change-request-status.type.ts
Outdated
Show resolved
Hide resolved
...ns/src/sql/ApplicationOfferingChangeRequests/Create-application-offering-change-requests.sql
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,7 @@ | |||
| CREATE TYPE sims.application_offering_change_request_status_types AS ENUM ( | |||
| 'In progress with the student', | |||
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.
As per the second AC in the ticket the is not present here. But first AC has.
@hellolynn-tbtb ? which one should we go for?
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 what I had in my story, https://app.zenhub.com/workspaces/student-information-management-system-5fce9df5aa1b45000e937014/issues/gh/bcgov/sims/1953. Open for suggestion @hellolynn-tbtb
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.
@ann-aot please use the Figma one and adjust the ticket.

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.
as @hellolynn-tbtb confirmed going without the
| * The status is set when the institution creates a | ||
| * application specific offering change request. | ||
| */ | ||
| InProgressWithTheStudent = "In progress with the student", |
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.
| import { Note } from "./note.model"; | ||
| import { ApplicationOfferingChangeRequestStatus } from "./application-offering-change-request-status.type"; | ||
|
|
||
| const REASON_MAX_LENGTH = 500; |
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 max length could be centralized like NOTES_MAX_LENGTH which could be used on POST API for class validators.
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 didn't get the point here, i believe it should done in the submit story
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.
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.
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.
Yes just the export is missing 😊
sources/packages/backend/libs/sims-db/src/entities/application-offering-change-request.model.ts
Outdated
Show resolved
Hide resolved
|
Great start @ann-aot . Few minor comments. |
andrepestana-aot
left a comment
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.
Looks good. Thanks for the explanations.
dheepak-aot
left a comment
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
sh16011993
left a comment
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 👍
andrewsignori-aot
left a comment
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.
Thanks for doing the changes and lets ensure that we are going to have a follow up on the active offering column 👍
guru-aot
left a comment
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
|
Kudos, SonarCloud Quality Gate passed!
|










application_offering_change_requeststable andapplication_offering_change_request_status_typesenum type