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

OBPIH-4764 bin import incorrect bin location type assigned #3436

Conversation

drodzewicz
Copy link
Collaborator

No description provided.

@drodzewicz drodzewicz self-assigned this Aug 25, 2022
@@ -476,7 +476,7 @@ class LocationService {
throw new ValidationException("location.cannotImportBinLocationsWithoutParentLocation.message")
}

LocationType defaultLocationType = LocationType.findByLocationTypeCode(LocationTypeCode.BIN_LOCATION)
LocationType defaultLocationType = LocationType.findByLocationTypeCodeAndName(LocationTypeCode.BIN_LOCATION, "Bin Location")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the wrong approach. We do not have certainty that in every instance of OB the naming will remain as it is here. I think we could try to take the oldest (date created) location type with code BIN_LOCATION.

Additionally the same issue occurs within the regular location import in the locationApiController.importCsv, because there is findByNameLike(name + '%') which also takes the newest record. Perhaps there we could get rid of like with % wildcard option.

@drodzewicz drodzewicz force-pushed the OBPIH-4764-bin-import-incorrect-bin-location-type-assigned branch from b52b535 to 2879c9b Compare August 25, 2022 11:48
@awalkowiak awalkowiak merged commit dab1b01 into release/0.8.19 Aug 25, 2022
@awalkowiak awalkowiak deleted the OBPIH-4764-bin-import-incorrect-bin-location-type-assigned branch August 25, 2022 17:18
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.

None yet

2 participants