Preferred inventory for distribution
In support#243 (closed) we discussed a change to GGCE that will allow genebanks to configure the order of preference when it comes to selecting the inventory of any accession.
Add private Integer distributionRank
to Inventory
as distribution_rank int default null
. On save, if isDistributable = "N"
force set distributionRank = null
.
UI updates
This affects Inventory
table, details and form.
Add form field for distributionRank
(after isDistributable
and visible only when isDistributable = 'Y'
) as Distribution preference: The distribution rank controls the order of preference when multiple inventory items of one accession are distributable. Items with lower ranking have preference.
In the table, add distributionRank
after isDistributable
column.
Update the logic of automatically selecting inventory items for distribution so that the item with the lowest ranking is selected.