Skip to content

Conversation

@ann-aot
Copy link
Contributor

@ann-aot ann-aot commented Jun 7, 2023

  • Created application_offering_change_requests table and application_offering_change_request_status_types enum type

@ann-aot ann-aot self-assigned this Jun 7, 2023
@ann-aot ann-aot added the DB DB migration involved label Jun 7, 2023
@ann-aot ann-aot marked this pull request as ready for review June 7, 2023 19:27
@@ -0,0 +1,2 @@
-- DROP Table
DROP TABLE IF EXISTS sims.application_offering_change_requests; No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@andrepestana-aot andrepestana-aot left a 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!

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),
Copy link
Collaborator

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Collaborator

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.

Copy link
Contributor

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?

Copy link
Collaborator

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?

Copy link
Collaborator

@dheepak-aot dheepak-aot Jun 7, 2023

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.

Copy link
Contributor Author

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

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),
Copy link
Contributor

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

@@ -0,0 +1,7 @@
CREATE TYPE sims.application_offering_change_request_status_types AS ENUM (
'In progress with the student',
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

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.
image

Copy link
Contributor Author

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",
Copy link
Collaborator

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;
Copy link
Collaborator

@dheepak-aot dheepak-aot Jun 7, 2023

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.

Copy link
Contributor Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant this constant must be more global as we see that it has more potential usage. like this.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
I believe we can add export when we are actually using it

Copy link
Collaborator

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 😊

@dheepak-aot
Copy link
Collaborator

Great start @ann-aot . Few minor comments.

Copy link
Contributor

@andrepestana-aot andrepestana-aot left a 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.

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@sh16011993 sh16011993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a 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 👍

Copy link
Contributor

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 49.81% ( 267 / 536 )
Methods: 41.56% ( 32 / 77 )
Lines: 55.33% ( 218 / 394 )
Branches: 26.15% ( 17 / 65 )

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 17.99% ( 2097 / 11659 )
Methods: 8.33% ( 124 / 1489 )
Lines: 20.75% ( 1835 / 8843 )
Branches: 10.4% ( 138 / 1327 )

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 69.4% ( 390 / 562 )
Methods: 59.15% ( 42 / 71 )
Lines: 71.52% ( 344 / 481 )
Branches: 40% ( 4 / 10 )

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

E2E SIMS API Coverage Report

Totals Coverage
Statements: 43.54% ( 3032 / 6964 )
Methods: 37.75% ( 339 / 898 )
Lines: 48.6% ( 2526 / 5197 )
Branches: 19.22% ( 167 / 869 )

@ann-aot ann-aot merged commit 7c5793f into main Jun 8, 2023
@ann-aot ann-aot temporarily deployed to DEV June 8, 2023 23:58 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 9, 2023 00:00 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 9, 2023 00:00 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 9, 2023 00:00 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 9, 2023 00:00 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 9, 2023 00:01 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 9, 2023 00:02 — with GitHub Actions Inactive
andrewsignori-aot pushed a commit that referenced this pull request Jun 9, 2023
#1953 - Request an Offering Change - DB Migrations  (#1995)
@ann-aot ann-aot deleted the feature/sims-1953/migration branch June 20, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DB DB migration involved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants