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

fix: zaak geometry should not be deleted on zaak update #2588

Merged
merged 9 commits into from
Feb 3, 2025

Conversation

edgarvonk
Copy link
Member

@edgarvonk edgarvonk commented Feb 2, 2025

Fixed issue where zaak geometry was deleted on every zaak update and fixed issue where zaak geometry update and deletions sometimes worked and sometimes did not. The issue was that for deletions a @JsonbNillable annotation was used on the Zaak object in the ZrcClient but for normal updates not. However this annotation is static and there is only one zaak patch method in the ZrcClient and this resulted in inconsistent behaviour. This was solved by introducing a custom JSONB serializer for the zaak Geometry class that dynamically either writes a null (for deletions) or the geometry (Point only for now) object to JSON.

Solves PZ-5299

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 2319 files.

Valid Invalid Ignored Fixed
2021 1 297 0
Click to see the invalid file list
  • src/main/java/net/atos/client/zgw/zrc/model/GeometryToBeDeleted.kt
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

Copy link
Contributor

github-actions bot commented Feb 2, 2025

unit-test-results

 80 files  +1  111 suites  +1   1m 33s ⏱️ -1s
388 tests +3  387 ✅ +3  1 💤 ±0  0 ❌ ±0 
482 runs  +5  480 ✅ +5  2 💤 ±0  0 ❌ ±0 

Results for commit 50ee303. ± Comparison against base commit 81519b1.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Feb 2, 2025

integration-test-results

 28 files  ±0   28 suites  ±0   37s ⏱️ +2s
108 tests +1  108 ✅ +1  0 💤 ±0  0 ❌ ±0 
121 runs  +1  121 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit 50ee303. ± Comparison against base commit 81519b1.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Feb 2, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 54.81%. Comparing base (81519b1) to head (50ee303).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...t/atos/client/zgw/zrc/model/GeometryToBeDeleted.kt 50.00% 1 Missing ⚠️
...in/kotlin/net/atos/zac/app/zaak/ZaakRestService.kt 75.00% 0 Missing and 1 partial ⚠️
...fo/client/zgw/zrc/jsonb/GeometryJsonbSerializer.kt 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2588      +/-   ##
============================================
+ Coverage     54.77%   54.81%   +0.04%     
- Complexity     3365     3372       +7     
============================================
  Files          1002     1003       +1     
  Lines         22747    22762      +15     
  Branches       1771     1777       +6     
============================================
+ Hits          12459    12478      +19     
- Misses         9376     9490     +114     
+ Partials        912      794     -118     
Flag Coverage Δ
integrationtests 50.12% <70.83%> (+0.01%) ⬆️
unittests 34.92% <75.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edgarvonk edgarvonk marked this pull request as ready for review February 3, 2025 08:59
@edgarvonk edgarvonk requested review from hsiliev and a team as code owners February 3, 2025 08:59
edgarvonk and others added 8 commits February 3, 2025 10:00
…es (where the zaakgeometrie is not updated); work in progress
… custom JSONB serializer for geometry objects that can dynamically either set or delete a geometry in a zaak patch request
… custom JSONB serializer for geometry objects that can dynamically either set or delete a geometry in a zaak patch request
…d.kt

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@edgarvonk edgarvonk force-pushed the feature/fix-zaak-geometry-deleted-on-zaak-update branch from e473395 to 0eb7c84 Compare February 3, 2025 09:00
@edgarvonk edgarvonk enabled auto-merge February 3, 2025 09:09
@edgarvonk edgarvonk disabled auto-merge February 3, 2025 09:27
@edgarvonk edgarvonk added this pull request to the merge queue Feb 3, 2025
Merged via the queue into main with commit d5f471d Feb 3, 2025
23 checks passed
@edgarvonk edgarvonk deleted the feature/fix-zaak-geometry-deleted-on-zaak-update branch February 3, 2025 09:43
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