[š Bug]: Workflow revision history shows newest timestamp for all revisions
Describe the bug In the workflow Versions panel, every revision shows the same timestamp (the time of the most recent save). Older revisionsā times are overwritten to match the newest revision, making the history misleading.
To Reproduce Steps to reproduce the behavior:
- Go to a workflow in Keep.
- Make an edit and Save (creates Revision A).
- Make another edit and Save (creates Revision B).
- Open Versions in the right sidebar.
- Observe that Revision A and Revision B display the same timestamp (the latest save time).
- Repeat another save and see older entriesā timestamps update again.
Expected behavior Each revision should display its own immutable creation timestamp (when that snapshot was taken). Creating a new revision must not change timestamps on earlier revisions. Sorting by time should reflect true chronological order.
This bug is caused by the way the backend handles the updated_at timestamp for workflow revisions. The WorkflowVersion model uses onupdate=func.now() for the updated_at field, so when a new revision is created and previous revisions have their is_current flag set to False, their updated_at timestamps are also updated to the current time. This results in all revisions showing the latest save time instead of their original creation time, which matches what youāre seeing in the Versions panel. The correct behavior would be for updated_at to represent the immutable creation time of each revision. Removing onupdate=func.now() from the updated_at column in WorkflowVersion will fix this and ensure each revision keeps its original timestampĀ (reference).
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report š | OtherĀ Ā Ā
Ā