Conversation
Member
Author
|
This PR triggered a discussion about how we handle lot numbers in general in the application. I won't handle the following in this PR since it'll require a proper design/discovery, but some ideas for future improvements include:
|
jmiranda
approved these changes
Sep 29, 2025
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.
✨ Description of Change
Link to GitHub issue or Jira ticket: https://pihemr.atlassian.net/browse/OBPIH-7506
OBS tickets that this resolves:
Description: There's a detailed explanation of the issue in the OBS tickets but in brief, when an inventory snapshot refresh is triggered for an inventory item (which was happening during putaway creation), it also triggers a product availability refresh on that inventory item. The product availability refresh logic wasn't differentiating between null and blank lot numbers and so it'd try to update both to the same default lot number, causing duplicate key errors. This change simply allows product availability refresh records to contain rows for blank lots as well.
Note that we rarely experience this because this particular refresh logic is only triggered by inventory snapshot refreshes. I assume the "regular" product availability refresh logic already handles this case properly (otherwise we'd see this error everywhere)