From e3fcb83dc99c317e5f94819eedb12159b3ff415b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 1 Feb 2026 22:02:06 +1100 Subject: [PATCH] [UI] Bug fix for test result table (#11236) (#11237) * [UI] Bug fix for test result table - Do not retain test choices when selecting a new test * Remove quick-pass action if test has defined choices (cherry picked from commit 94be4ebb267575dd304b2c0e4e42ad858b1e0070) Co-authored-by: Oliver --- src/frontend/src/forms/StockForms.tsx | 4 ++++ src/frontend/src/tables/stock/StockItemTestResultTable.tsx | 1 + 2 files changed, 5 insertions(+) diff --git a/src/frontend/src/forms/StockForms.tsx b/src/frontend/src/forms/StockForms.tsx index 262605ede0..f2c515e570 100644 --- a/src/frontend/src/forms/StockForms.tsx +++ b/src/frontend/src/forms/StockForms.tsx @@ -1478,6 +1478,10 @@ export function useTestResultFields({ setChoices([]); setFieldType('string'); } + } else { + // No choices defined - this is a free-form text field + setChoices([]); + setFieldType('string'); } } }, diff --git a/src/frontend/src/tables/stock/StockItemTestResultTable.tsx b/src/frontend/src/tables/stock/StockItemTestResultTable.tsx index 569fb5c136..c2c81d2548 100644 --- a/src/frontend/src/tables/stock/StockItemTestResultTable.tsx +++ b/src/frontend/src/tables/stock/StockItemTestResultTable.tsx @@ -358,6 +358,7 @@ export default function StockItemTestResultTable({ icon: , hidden: !record.templateId || + !!record.choices || record?.requires_attachment || record?.requires_value || record.result,