The page has a workflow triggered by the calender-x icon being clicked.
The first two steps of the workflow are simple.
1. Set the value of a custom state to empty.
Trigger a workflow in which the first step is Make changes to a thing.Among other fields updated is DateDue which is set to the value (empty) of the custom state set in step 1.
After execution:
the custom state is empty, as it should be,
the Action thing still contains its non-empty value, not the empty value it should contain,
the page still shows the non-empty value.
Here’s a link to the app.
If you want to test this, do the following:
Run as my user, which you’ll see is the only one in the Users table.
In the index page, click on the name of any Action. Pick one that has a non-empty due date.
Version 1 is similar to the original, but I’ve done my best to remove any extraneous workflows and actions that might confuse the issue.
Version 2 brings the workflow action “Make changes to Action…” up a level. This way the timing of its execution isn’t influenced by being in a triggered workflow below the element “is clicked” workflow.
Please refer to the first post of this topic for a deeper explanation of the problem. The key difference is that accessing either action-detail page is done by clicking the 1 or 2, not the Action name.
The problem remains in both versions. It is as though the second step is allowed to execute before the first is allowed to complete.
For the record, I have reported this as a bug. However, if you already understand this kind of problem and how to deal with it reliably, please chime in.
There was indeed a bug with the workflow engine with the way an empty value for a custom state was being applied to following actions on the server. It was particular corner case but real.
We pushed a fix, sorry about that one, I know it was frustrating.