Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26791

Default value "Current datetime" for ezdatetime is wrongly cached

    Details

      Description

      When using the ezdatetime field type it allows users to select the default value. One of the options is "Current datetime", which I would expect to reflect the time a value for when a content object is created.

      Currently the timestamp used is the one from when the content type was modified the cache was last cleared, where it is expected to be the creation timestamp of the new content object.

      Steps to reproduce:

      • Modify a content type
      • Add ezdatetime field with a default value of "Current datetime"
      • Save content type and make note of time (e.g. 14:47)
      • Create object of that content type and make note of the field value (e.g. 14:47)
      • Publish object
      • Wait for 15 minutes
      • Create new object and make note that the default field value is still 14:47
      • Expectation is that the value would be 15:02 to reflect creation of new object time
      • Clear all caches, create a new object: Note the default value is now the current time

        Issue Links

          Activity

          Hide
          Gunnstein Lye added a comment -
          Show
          Gunnstein Lye added a comment - QA, please test https://github.com/ezsystems/ezpublish-kernel/pull/1870
          Hide
          Rui Silva (Inactive) added a comment -

          PR tested and approved by QA.
          Sending back to dev-needed so that PR can be merged.
          Please send back to QA after merge is done.

          Show
          Rui Silva (Inactive) added a comment - PR tested and approved by QA. Sending back to dev-needed so that PR can be merged. Please send back to QA after merge is done.
          Show
          Gunnstein Lye added a comment - - edited Merged in master, 6.7, 6.6: https://github.com/ezsystems/ezpublish-kernel/commit/8ad0223fc5182864f3b070e2335227e2d34c9f32
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA.
          Hide
          Gunnstein Lye added a comment -

          Please note: This bug fix introduces another bug. The fix for that is being reviewed here: https://github.com/ezsystems/ezpublish-kernel/pull/1916

          Show
          Gunnstein Lye added a comment - Please note: This bug fix introduces another bug. The fix for that is being reviewed here: https://github.com/ezsystems/ezpublish-kernel/pull/1916

            People

            • Assignee:
              Unassigned
              Reporter:
              Jani Tarvainen
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 7 hours, 45 minutes
                2d 7h 45m