OBPIH-7364 Enable deletion of a product source that has a package associated#5743
Merged
Conversation
…uctSupplierService to handle product package deletion
alannadolny
commented
Jan 29, 2026
|
|
||
| String bindOrInferLotNumber(ImportPackingListItem obj, Map source) { | ||
| String lotNumber = source['lotNumber']?.trim() ?: null | ||
| String lotNumber = source['lotNumber'] |
Collaborator
Author
There was a problem hiding this comment.
We decided to revert that change, because of: https://pihemr.atlassian.net/browse/OBPIH-7640?focusedCommentId=176936
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5743 +/- ##
============================================
+ Coverage 9.12% 9.83% +0.71%
- Complexity 1170 1386 +216
============================================
Files 701 743 +42
Lines 45281 46386 +1105
Branches 10851 11033 +182
============================================
+ Hits 4131 4563 +432
- Misses 40497 41114 +617
- Partials 653 709 +56 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| void delete(Set<ProductPackage> productPackages) { | ||
| List<String> productPackageIds = productPackages*.id | ||
| productPackageIds.each(productPackageGormService.&delete) |
Collaborator
There was a problem hiding this comment.
interesting with the & 🤔
One nitpicky comment: I think we should have delete method for one instance, not for list, so I would suggest introducing at least another delete method that would accept one ProductPackage instance that you would call here like:
void delete(Set<ProductPackage> productPackages) {
List<String> productPackageIds = productPackages*.id
productPackageIds.each(delete(it))
}
void delete(ProductPackage productPackage) {
...
}
kchelstowski
approved these changes
Feb 2, 2026
SebastianLib
approved these changes
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.