Non-required field_time fields save the current time as default in 1.0.0-beta5

Created on 28 January 2025, about 1 month ago

Problem/Motivation

In versions 1.0.0-beta5 of the field_time module, I’ve noticed that non-required time fields are automatically saving the current time as their default value. This behavior differs significantly from 1.0.0-beta3, where non-required fields would remain empty unless explicitly populated.

This change seems to have been introduced without any mention in the release notes of beta4, beta5, or subsequent releases. The lack of documentation or an explicit setting to control this behavior has made it difficult to manage time fields in use cases where blank fields are critical.

Impact

I am heavily using the field_time module to manage time intervals (e.g., durations), where an empty value is a valid and necessary state for non-required fields. Automatically saving the current time as a default introduces incorrect data and breaks the integrity of the workflows reliant on this module.

Steps to Reproduce

  1. Install field_time:1.0.0-beta5.
  2. Create a time field on any entity and do not mark it as required.
  3. Save the entity without filling in the time field.
  4. Observe that the current time is saved in the database for the field, even though it was left blank.

Expected Behavior

Non-required time fields should remain empty unless explicitly populated by the user.

Observed Behavior

Non-required time fields are automatically populated with the current time upon saving the entity.

Request

  1. Documentation Update: Please document this behavioral change in the release notes of 1.0.0-beta4 and later versions to inform users of the module.
  2. Configuration Option: Provide a setting to allow users to decide whether non-required fields should save the current time by default or remain empty.
  3. Bug Fix: Restore the pre-beta4 behavior where non-required fields remain empty unless explicitly populated.

Additional Context

This change has significantly impacted my use case, as I rely on non-required time fields to represent intervals or durations, and these should remain empty unless explicitly filled in by the user. Automatically saving the current time introduces incorrect data and forces unwanted manual cleanup.

I appreciate the work of the maintainers on this module and hope this feedback helps improve its usability for diverse scenarios.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇰🇬Kyrgyzstan dan_metille

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

Comments & Activities

Production build 0.71.5 2024