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(FSADT1-1736): adding location patch operation #1516

Merged
merged 12 commits into from
Mar 31, 2025
Merged

Conversation

paulushcgcj
Copy link
Contributor

@paulushcgcj paulushcgcj commented Mar 28, 2025

Description

Handles the location change when no reason code is required. It allows for the addition of new locations and changes in existing ones. As a reminder, primary locations cannot be expired, and this patch does not handle the expiration of locations as well, as it requires the reason code.

  • Added DEBUG logging for R2DBC-related packages in the test resources.
  • Extended PatchUtils with overloaded filtering methods and merge functionality, supplemented by new unit tests.
  • Introduced PatchOperationLocationService to support location-specific patch operations and updated client codes documentation.

Type of change

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

How Has This Been Tested?

  • New unit tests
  • New integrated tests

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:
Any successful deployments (not always required) will be available here

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

After merge, new images are deployed in:


Thanks for the PR!

Deployments, as required, will be available below:
Any successful deployments (not always required) will be available here

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

After merge, new images are deployed in:

@paulushcgcj paulushcgcj marked this pull request as ready for review March 31, 2025 18:26
@paulushcgcj paulushcgcj requested a review from Copilot March 31, 2025 18:26
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new location patch operation feature, including additional logging for R2DBC operations and supplementary tests for patch utilities and controller endpoints.

  • Added DEBUG logging for R2DBC-related packages in the test resources.
  • Extended PatchUtils with overloaded filtering methods and merge functionality, supplemented by new unit tests.
  • Introduced PatchOperationLocationService to support location-specific patch operations and updated client codes documentation.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
legacy/src/test/resources/application-default.yml Added DEBUG logging levels for R2DBC operations.
legacy/src/test/java/ca/bc/gov/app/util/PatchUtilsTest.java Added new unit tests for merging and filtering JSON nodes.
legacy/src/test/java/ca/bc/gov/app/controller/ClientPatchControllerIntegrationTest.java Added test cases for various location patch operations.
legacy/src/test/java/ca/bc/gov/app/controller/ClientCodesControllerIntegrationTest.java Changed parameterized tests into simpler tests for client codes.
legacy/src/main/java/ca/bc/gov/app/util/PatchUtils.java Integrated new filtering and merging methods to support patch operations.
legacy/src/main/java/ca/bc/gov/app/service/patch/PatchOperationLocationService.java Created new service to handle location patch operations on client data.
legacy/src/main/java/ca/bc/gov/app/service/patch/PatchOperationClientService.java Updated documentation to clarify restricted field modifications.
Comments suppressed due to low confidence (2)

legacy/src/main/java/ca/bc/gov/app/util/PatchUtils.java:341

  • "removePrefix" is invoked here but its definition is not visible in the diff. Please ensure that the method is defined or correctly imported so that the functionality works as intended.
String newPath = removePrefix(path, prefix);

legacy/src/main/java/ca/bc/gov/app/service/patch/PatchOperationLocationService.java:171

  • "PatchUtils.loadIds(patch)" is called but no such method is defined in PatchUtils. Please verify whether this should reference an existing method (e.g., a pluralized version of loadId) or if an implementation should be added.
.fromIterable(PatchUtils.loadIds(patch))

Copy link
Contributor

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

Copy link
Contributor

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

Copy link
Contributor

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

Copy link
Contributor

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

@paulushcgcj paulushcgcj enabled auto-merge (squash) March 31, 2025 18:53
@paulushcgcj paulushcgcj merged commit f876ed6 into main Mar 31, 2025
40 checks passed
@paulushcgcj paulushcgcj deleted the feat/FSADT1-1736 branch March 31, 2025 18:54
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