Skip to content

Issue 53934: Remove stored amount "too precise" validation check on setting amount modal#1861

Merged
cnathe merged 15 commits intodevelopfrom
fb_amountPrecision53934
Oct 7, 2025
Merged

Issue 53934: Remove stored amount "too precise" validation check on setting amount modal#1861
cnathe merged 15 commits intodevelopfrom
fb_amountPrecision53934

Conversation

@cnathe
Copy link
Contributor

@cnathe cnathe commented Oct 6, 2025

Rationale

Issue 53934: Sample Manager: show full precision on sample amount edit
Issue 53978: Inconsistent enforcement of precision in different places you can enter amounts

Our changes to the sample amounts/units columns moved the display unit conversion code into a SQL expression column to convert the base unit value into the display unit value (ex: stored as mL but displayed as L). This also include a ROUND() call that rounded the displayValue to the precision based on the unit type (i.e. mL shows 6 digits, L shows 9, uL shows 3, etc.).

However this means that the rounded display value is also what shows in the edit cases. As mentioned in one of the issues, a value entered as 0.0005 uL would display as the rounded 0.001 uL and would be 0.001 uL on edit in the grid, bulk, or sample amount modal.

This PR removes the "value is too precise" error on the sample amount modal, so that entering values there matches entering values from the editable grid and file import (which allow more precision). It also changes the display behavior to not do the ROUND() in SQL so that we can show the non-rounded value on edit in grid, bulk, and sample amount modal (i.e. we would display 0.001 uL as the display value but show the non rounded 0.0005 uL on edit).

Related Pull Requests

Changes

  • remove isValuePrecisionValid() and the related isPrecisionValid()
  • use amount value instead of displayValue for EditableGrid and SampleAmountEditModal

@cnathe cnathe requested review from XingY and labkey-susanh October 6, 2025 15:30
@cnathe cnathe merged commit efa7f8e into develop Oct 7, 2025
3 checks passed
@cnathe cnathe deleted the fb_amountPrecision53934 branch October 7, 2025 18:51
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.

2 participants