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

#2741 - Ministry Filter Search Programs and Offerings [Fix Expired Programs Sort Issue] #3921

Conversation

sh16011993
Copy link
Collaborator

@sh16011993 sh16011993 commented Nov 12, 2024

As a part of this PR, the query to retrieve the list of programs was updated to ensure that the sort order of the retrieved list of programs has the correct order where the inactive programs comprise the programs that have isActive = false or the ones that have the effectiveEndDate <= CURRENT_DATE

@sh16011993 sh16011993 self-assigned this Nov 12, 2024
@sh16011993 sh16011993 added the SIMS-Api SIMS-Api label Nov 12, 2024
@sh16011993 sh16011993 changed the title #2741 - Ministry Filter Search Programs and Offerings (Fix Expired Programs) #2741 - Ministry Filter Search Programs and Offerings [Fix Expired Programs] Nov 12, 2024
@sh16011993 sh16011993 changed the title #2741 - Ministry Filter Search Programs and Offerings [Fix Expired Programs] #2741 - Ministry Filter Search Programs and Offerings [Fix Expired Programs Sort Issue] Nov 12, 2024
@andrepestana-aot andrepestana-aot self-requested a review November 12, 2024 21:51
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.

Change looks and we should go ahead with it. The logic with the active and expiration is just something to be improved. Forcing it as a regular status just brings complexities that don`t feel worth it.

On the SQL command, there are SQL reserved worked in upper case and others in lower case.
We should try to stick with one or another IMO.=, not a blocker, hence approving.

WHEN programs.programStatus = '${ProgramStatus.Approved}' and programs.isActive = true THEN ${SortPriority.Priority2}
WHEN programs.programStatus = '${ProgramStatus.Declined}' and programs.isActive = true THEN ${SortPriority.Priority3}
WHEN programs.isActive = false THEN ${SortPriority.Priority4}
WHEN programs.programStatus = '${ProgramStatus.Pending}' and programs.isActive = true and (programs.effectiveEndDate is null OR programs.effectiveEndDate > CURRENT_DATE) THEN ${SortPriority.Priority1}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove the TODO comment.

Copy link
Collaborator

@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. Just a minor comment to remove the TODO comment.

@sh16011993 sh16011993 marked this pull request as draft November 12, 2024 22:21
@sh16011993 sh16011993 marked this pull request as ready for review November 12, 2024 22:41
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 22.3% ( 3709 / 16632 )
Methods: 10.38% ( 214 / 2062 )
Lines: 25.64% ( 3217 / 12545 )
Branches: 13.73% ( 278 / 2025 )

Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 65.43% ( 583 / 891 )
Methods: 59.26% ( 64 / 108 )
Lines: 68.54% ( 464 / 677 )
Branches: 51.89% ( 55 / 106 )

Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 86.92% ( 1243 / 1430 )
Methods: 88.57% ( 124 / 140 )
Lines: 87.77% ( 1055 / 1202 )
Branches: 72.73% ( 64 / 88 )

Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 66.46% ( 5644 / 8492 )
Methods: 63.93% ( 693 / 1084 )
Lines: 70.48% ( 4446 / 6308 )
Branches: 45.91% ( 505 / 1100 )

@sh16011993 sh16011993 added this pull request to the merge queue Nov 12, 2024
Merged via the queue into main with commit d80c568 Nov 12, 2024
20 checks passed
@sh16011993 sh16011993 deleted the 2741_ministry_filter_search_programs_and_offerings_add_location_search_fix_expire_programs branch November 12, 2024 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SIMS-Api SIMS-Api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants