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

feat: CE-1045 Add getLeadsByActionTaken query #95

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

mikevespi
Copy link
Contributor

@mikevespi mikevespi commented Oct 16, 2024

Description

In order for users to be able to filter complaints by action taken in NATCom, a function to return the list of lead_identifiers that belong to case_files that have had that action taken on them was needed. Current implementation aims to avoid raw querying the database via TypeORM, but the result is 3 separate calls. Refactoring to a single query handled with joins may be a good idea, however the impact of raw queries can cause problem with some ORMs. Worth looking into, for now this follows existing pattern in the code base.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tested manually, and in e2e tests found in NATCom PR bcgov/nr-compliance-enforcement#707

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Further comments


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

In order for users to be able to filter complaints by action taken in NATCom,
a function to return the list of lead_identifiers that belong to case_files
that have had that action taken on them was needed. Current implementation
aims to avoid raw querying the database via TypeORM, but the result is 3
separate calls. Refactoring to a single query handled with joins may be a
good idea, however the impact of raw queries can cause problem with some
ORMs. Worth looking into, for now this follows existing pattern in the code
base.
@afwilcox afwilcox added this pull request to the merge queue Oct 16, 2024
Merged via the queue into main with commit 3a6bb8b Oct 16, 2024
9 checks passed
@afwilcox afwilcox deleted the feat/CE-1045-add-get-leads-by-action-taken branch October 16, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants