[Resolved] Cannot Edit Sample Header - "Date Sampled" cannot be later than ${created}

Hi,

We are creating Sample Requests via the API - and setting the “Date Sampled” field to some time in the future when that Sample will be collected and submitted to the lab.

The API allows this, but when I try and edit any Sample Header field (or just press the [save] button) in the frontend, the Date Sampled field throws the following error:

Date Sampled is after 2025-10-28 23:51, please correct.

where the date provided, as far as I can tell, only correlates with the created field when I interrogate the sample request via the api.

curl -X GET https://u:p@senhost/senaite/@@API/senaite/v1/AnalysisRequest?id=CWS-0052 | jq | grep -i "2025"
      "created": "2025-10-28T23:51:01+00:00",
      "getDateSampled": "2025-11-03T00:00:00+00:00",
      "getPrioritySortkey": "3.2025-10-28T23:51:01+00:00",
      "modified": "2025-10-19T22:35:14+00:00",

Our workflow goes:

  1. Create Work Order, including analysis request (created in Senaite, sets the created date and the Date Sampled fields)
  2. Samples are collected, that day, or often days after and taken to the Lab
  3. Lab edits Sample headers in Senaite, adding sample to a Batch
    → This fails if the Date Sampled field is more recent than created field

We have had the users encounter a situation where the logic controlling these dates is in a locking cycle - eg

I press save on CWS-0027-R01

I fix (1), and press save - (2) still errors:

I fix error (2) - ie Date Sample Received is before 2025-11-03 00:00, please correct.

I now have a 3rd error - Date Sample Received is after 2025-10-29 02:50, please correct.

This is not resolvable - the date cannot be both before 2025-10-29 and after 03-11-2025, and each time I adjust it to fix one rule, it complains about the other.

Are you able to point me in the direction of where this interface/field logic is controlled (preferably without forking code), and where I can adjust/remove the restrictions?

Thanks in advance for any tips/pointers -

Bernie

After many little clues in github issues, the forums and BIKA documentation talking about “Sample Workflow” I was finally able to find the option to turn that on in the settings, and it looks like it will be the solution to our requirements.

For others making a similar journey: