Make the inventory lot barcode findable - #4026
Open
mherman22 wants to merge 6 commits into
Open
Conversation
This was referenced Aug 10, 2026
mherman22
force-pushed
the
inventory/6-lot-barcode
branch
from
August 11, 2026 07:22
a473cca to
7b357a2
Compare
Collaborator
Author
mherman22
force-pushed
the
inventory/6-lot-barcode
branch
from
August 14, 2026 21:36
7b357a2 to
9ea7f50
Compare
…hboard search and a hint that says what it is
…er, locked once saved
…e read off screen
mherman22
force-pushed
the
inventory/6-lot-barcode
branch
from
August 17, 2026 11:44
9ea7f50 to
248c7ac
Compare
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.
Stack (review bottom-up):
Stacked on #4019. Two commits are new here.
The Barcode field on the lot modal was write-only: you could type a value and
it was stored and enforced unique, but nothing ever read it back.
InventoryLotDAO.getByBarcodewas written and had no callers at all, thebarcode was not a table column, and the dashboard search matched only lot
number and item name. Nothing in the UI said whether the field meant the
manufacturer's barcode or an internal one, which matters because the UNIQUE
constraint is only correct for the internal reading — a GTIN is shared by every
lot of a product.
The barcode is now the lab's own label and the system mints it. Leave the field
blank and the service generates one from the item code and lot number
(
TEST_REAGENT_A_LOT_2025_001), so a human can still identify the lot when theprinted label is damaged; supply one explicitly and it is normalised instead.
This reuses
CodeGeneratorand mirrorsInventoryItemServiceImpl.resolveCodeexactly, including collision suffixing and a localized duplicate error rather
than a raw constraint violation. The field locks after save the same way the
item code does, since printed labels have to keep working. Lookup is wired
through to
GET /rest/inventory/lots/barcode/{barcode}and the dashboardsearch now matches on barcode.
The dashboard tests turned up a separate bug worth a look: rows were matched to
lots by array index, so with a sortable table any row action — move, dispose,
QC — could act on a different lot than the one clicked. Now matched by id, with
a regression test that fails against the old lookup.
Deliberately not here: scan-to-act on the dashboard, lot label printing, and
GS1 parsing to auto-fill lot number and expiry from a manufacturer barcode.
Each is a feature in its own right and depends on this being wired up first.