Skip to content
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

Create Application Versioning and use the versioning to get previous version(s) #4247

Open
4 of 8 tasks
dheepak-aot opened this issue Jan 15, 2025 · 2 comments
Open
4 of 8 tasks
Assignees
Labels

Comments

@dheepak-aot
Copy link
Collaborator

dheepak-aot commented Jan 15, 2025

Describe the task
When a student application is edited and submitted one or more times, then we have previous version(s) of the same application. Currently we use the application number(not id) and the submitted date to retrieve the previous versions.

Instead we should start to version the application in DB (Similar to offerings) and use the version to retrieve the previous versions.

Acceptance Criteria

  • Create versioning for sims.applications
  • Restructure the way how routes and UI are loaded in student application view in ministry(comes from student search).
  • The outcome must result in the current version routes(highlighted in screenshot) always loading latest version of application on-refresh.
  • Update the API loading the previous versions in sidebar to use versioning.

image.png

Additional context

  • Add any other context about the task here.
  • Or here

Technical

  • Create new columns to keep the history: parent_application_id and preceding_application_id.
  • Populate the new columns when an application is edited.
  • Create the DB migration to have the new columns populated.
  • Adjust the necessary methods in the API to allow the student application view on the Ministry (image above) to retrieve information based on the new application_parent_id.
  • Ensure the route for the student application view on the Institution is also adjusted.
  • Adjust the E2Es
    • Create an E2E to ensure the current application will be the one retrieved based on the application_parent_id.
@dheepak-aot dheepak-aot changed the title Create Application Versioning to load previous versions Create Application Versioning and use the versioning to get previous version(s) Jan 16, 2025
@dheepak-aot dheepak-aot added the Business Items under Business Consideration label Jan 16, 2025
@CarlyCotton CarlyCotton added this to the Full-Time "Asset" milestone Jan 16, 2025
@CarlyCotton CarlyCotton added Dev & Architecture Development and Architecture and removed Business Items under Business Consideration labels Jan 16, 2025
@andrewsignori-aot andrewsignori-aot removed the Dev & Architecture Development and Architecture label Jan 16, 2025
@sh16011993 sh16011993 self-assigned this Jan 30, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 5, 2025
### As a part of this PR, the following were completed:

- Created migrations for the 2 columns: `parent_application_id` and
`preceding_application_id`.
- Added the above columns to the database entity models.
- Created the DB migration to have the new columns populated for the
existing entries.
- Adjusted the code logic to save the `parent-application-id` and the
`preceding-application-id` for the application created for the first
time (as draft) and then again, these columns to be updated when the
application is edited and submitted again.
- Adjusted the e2e tests for `workers`, `queue-consumers` and `api` to
adapt to the change in logic.

### **Screenshot:**

**Rollback evidence:**

<img width="1130" alt="image"
src="https://github.com/user-attachments/assets/0bfdd2ec-bbac-4fe7-a7e1-d90cb6a2aa55"
/>

---------

Co-authored-by: Dheepak Ramanathan <[email protected]>
sh16011993 added a commit that referenced this issue Feb 6, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 6, 2025
### As a part of this PR, the following was completed:

- Added Indexes for the `parent_application_id` and
`preceding_application_id` columns.
@ninosamson
Copy link
Collaborator

Tagging this to 2.6 - for QA @astridSABC for 2.5, we should still test create, edit, resubmit and draft applications as a regression test.

cc: @Joshua-Lakusta

@astridSABC
Copy link
Collaborator

@ninosamson Test Environment: Pass: Create, Edit, Resubmit application and Create draft application (edit, save draft)

cc: @Joshua-Lakusta

github-merge-queue bot pushed a commit that referenced this issue Feb 21, 2025
### As a part of this PR, the following were completed:

- Adjusted the necessary controllers / methods in the API to allow the
student application view on the Ministry and the Institution to
optionally retrieve the latest application details based on the provided
application id (considered as parent application) or to retrieve the
application details of the passed application id based on the value of
the query parameter `isParentApplication` set to true or false
respectively.
- Modified the existing method to `check if a previous application
exists` and added a method to `retrieve the current application from the
parent application`.
- Adjusted the existing API `e2e tests`.

---------

Co-authored-by: Dheepak Ramanathan <[email protected]>
sh16011993 added a commit that referenced this issue Feb 25, 2025
sh16011993 added a commit that referenced this issue Feb 26, 2025
- Changes for the Institution View
- Changes for the Supporting User
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants