feat: CE-1045 Add getLeadsByActionTaken query #95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
How Has This Been Tested?
Tested manually, and in e2e tests found in NATCom PR bcgov/nr-compliance-enforcement#707
Checklist
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: