Skip to content

Workflow: Add Update Sample Status Action#7667

Open
labkey-alan wants to merge 5 commits into
developfrom
fb_workflow_sample_status
Open

Workflow: Add Update Sample Status Action#7667
labkey-alan wants to merge 5 commits into
developfrom
fb_workflow_sample_status

Conversation

@labkey-alan
Copy link
Copy Markdown
Contributor

@labkey-alan labkey-alan commented May 14, 2026

Add validation for sample status changes during Aliquot/Derive/Pool actions

Rationale

Related Pull Requests

Changes

  • Add UpdateSampleStatus action type
  • Add validation for UpdateSampleStatus
    • Share validation logic for Derive, Pool, Aliquot, and Remove from Storage actions

Tasks 📍

  • Claude Code Review
  • Manual Testing
  • Test Automation

@labkey-alan labkey-alan self-assigned this May 14, 2026
@labkey-alan labkey-alan force-pushed the fb_workflow_sample_status branch from 5148f0c to 6ede52e Compare May 19, 2026 15:14
@labkey-alan labkey-alan force-pushed the fb_workflow_sample_status branch from 6775ce6 to e4531cc Compare May 20, 2026 19:30
@labkey-alan labkey-alan marked this pull request as ready for review May 20, 2026 20:43
@labkey-alan labkey-alan force-pushed the fb_workflow_sample_status branch from 2a93f16 to 2856ddc Compare May 20, 2026 21:34
* UPDATE_STATUS_KEY is true
* - STATUS_KEY is optional, but when present the value must be a valid status
* - REMOVE_FROM_STORAGE_KEY may only be present when STATUS_KEY is also present
* - If REMOVE_STORAGE_KEY is true, then the value for STATUS_KEY must represent a consumed state
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* - If REMOVE_STORAGE_KEY is true, then the value for STATUS_KEY must represent a consumed state
* - If REMOVE_FROM_STORAGE_KEY is true, then the value for STATUS_KEY must represent a consumed state

DataState state = SampleStatusService.get().getStateForRowId(container, statusId);

if (state == null)
return prefix + "Invalid " + STATUS_KEY + " (" + statusId + ").";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps:

Suggested change
return prefix + "Invalid " + STATUS_KEY + " (" + statusId + ").";
return prefix + "invalid " + STATUS_KEY + " (" + statusId + ") for container " + container.getPath() + "."

@labkey-alan labkey-alan force-pushed the fb_workflow_sample_status branch from 2856ddc to 5114c94 Compare May 21, 2026 23:13
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