Use current time setting for the timestamp widget

Created on 11 June 2018, about 7 years ago
Updated 1 September 2023, almost 2 years ago

The datetime timestamp widget sets the value of the submitted form element to the current time, if left empty. This essentially forces the form element to always be required. There should be a field widget setting that allows to choose whether this is the desired behavior or not so that empty fields using this form element are possible.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Datetime 

Last updated 5 days ago

Created by

🇵🇪Peru krystalcode

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

  • First commit to issue fork.
  • 🇧🇪Belgium dieterholvoet Brussels

    The config schema was in the wrong place, causing it to not be used. I started a MR based on the last patch and fixed this issue there.

  • last update almost 2 years ago
    Custom Commands Failed
  • last update over 1 year ago
    Patch Failed to Apply
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    Patch Failed to Apply
  • First commit to issue fork.
  • 🇹🇼Taiwan joey91133

    fix conflict after 10.2.x and 11.x

  • Pipeline finished with Failed
    over 1 year ago
    Total: 164s
    #87438
  • Status changed to Needs review over 1 year ago
  • Pipeline finished with Failed
    over 1 year ago
    Total: 499s
    #87442
  • Status changed to Needs work over 1 year ago
  • 🇮🇳India djsagar

    Hi @joey91133,

    Getting error while applying MR.

    moving back to NW.

    After MR:

  • Status changed to Needs review over 1 year ago
  • 🇹🇼Taiwan joey91133

    @djsagar
    This is a bug on gitlab.
    You should use .diff file not .patch.
    I don't know why gitlab will cache patch file on MR.

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    With a schema change going to need an upgrade path + tests around that.

    Issue summary will also need to be updated to use standard issue template. With a UI change we probably need a change record.

  • 🇬🇧United Kingdom nexusnovaz

    Used the 4681 MR to update the patch so it applies on Drupal 10.2.x.

  • Pipeline finished with Failed
    over 1 year ago
    Total: 481s
    #117484
  • 🇺🇸United States cantrellnm

    #46 doesn't apply for me with Drupal 10.2.7 so here's a re-roll

  • Pipeline finished with Failed
    11 months ago
    Total: 158s
    #267092
  • 🇧🇪Belgium dieterholvoet Brussels

    I rebased the MR against 11.x and fixed an issue where the field value was always overwritten, even if the field already had a value.

  • First commit to issue fork.
  • 🇳🇱Netherlands Lendude Amsterdam

    There was a fatal error when submitting an empty value. Fixed the error and added some test assertions to check this scenario.

  • Pipeline finished with Failed
    11 months ago
    Total: 188s
    #272586
  • 🇨🇳China lawxen

    Reroll (Merge request !4681) for 10.3.9

  • 🇫🇷France PhilY 🇪🇺🇫🇷 Paris, France

    Patch #51 works for me using Drupal 10.3.9

  • 🇷🇺Russia Chi

    I've just released a module that implements the date/time fields in a different way.
    It also supports HTML5 elements in views exposed forms
    https://www.drupal.org/project/date_point

  • First commit to issue fork.
  • Pipeline finished with Failed
    6 months ago
    Total: 3239s
    #417146
  • Pipeline finished with Failed
    6 months ago
    Total: 78s
    #417294
  • Pipeline finished with Failed
    6 months ago
    Total: 144s
    #417415
  • Pipeline finished with Failed
    6 months ago
    Total: 91s
    #417417
  • Pipeline finished with Failed
    6 months ago
    Total: 1403s
    #417422
  • First commit to issue fork.
  • Pipeline finished with Failed
    5 months ago
    Total: 860s
    #445168
  • Pipeline finished with Failed
    5 months ago
    Total: 522s
    #445216
  • 🇦🇺Australia geoffreyr Sydney, AU / Gadigal country

    I think I've fixed the TimestampTest by ensuring that $this->fieldName gets set. I still see a lot of tests failing but none of them relate to the timestamp widget.

    BTW hi @man-1982 long time no see (:

  • 🇺🇸United States smustgrave

    Open tags still seem needed

  • 🇺🇸United States smustgrave

    Actually missed one as upgrade path will need test coverage

  • 🇦🇺Australia geoffreyr Sydney, AU / Gadigal country

    @smustgrave Thanks for your checks. I've updated the issue description to try and conform to the current template. I don't know much about upgrade path tests but I'll try and figure this out while I'm working on this issue.

    I might also see about adjusting the MR and tests further to add functionality. I'd like to ensure we've got an "on demand" setting that lets the field remain empty as long as we need it to.

  • Pipeline finished with Failed
    5 months ago
    Total: 240s
    #445300
  • 🇦🇺Australia geoffreyr Sydney, AU / Gadigal country

    Issue summary updated as of #60.

  • Pipeline finished with Failed
    19 days ago
    Total: 126s
    #541887
Production build 0.71.5 2024