Automatically set status to done/pending based on timestamp in log form UI

Created on 10 March 2022, over 3 years ago
Updated 28 May 2025, about 1 month ago

Problem/Motivation

Nick from BOTL Farm pointed out a feature that was in the 1.x branch of Log, but wasn't ported to 2.x: https://github.com/farmOS/farmOS/issues/508

In 1.x there was a bit of Javascript that would automatically toggle the "done" / "not done" checkbox in log add/edit forms when the timestamp field was changed. If the timestamp was less than "now" the log was assumed to be "done", otherwise it was assumed to be "not done".

https://git.drupalcode.org/project/log/-/blob/7.x-1.x/log.done.js

Proposed resolution

Replicate the script logic from https://git.drupalcode.org/project/log/-/blob/7.x-1.x/log.done.js in Log 2.x.

Perhaps Drupal's new #states property can be used instead of JS?

Remaining tasks

TBD

User interface changes

Automatically change status to "done" / "pending" in Log add/edit forms when the timestamp field is changed.

API changes

None.

Data model changes

None.

πŸ“Œ Task
Status

Closed: won't fix

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States m.stenta

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024