Add the default date-with-time configuration if missing#16902
Merged
Add the default date-with-time configuration if missing#16902
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
In V13 (and below), the default "Date Picker with time" data-type seems to have a stored configuration:
But in fact, this is just a default value on the server-side implementation of
DateTimeConfiguration:The database contains no configuration data for ID -36 (
Constants.DataTypes.DateTime):This works in V13, but not in V14, because the V14 UI honours the fallback/default behavior mentioned on the data-type configuration:
In effect, this means that unless the default "Date Picker with time" has been explicitly saved in V13 (and thus the configuration has been persisted in the database), any upgraded "Date Picker with time" property will no longer have the time UI in V14 - they will appear and function as plan date editors.
The content property data, however, still contains the time component, so... we only need to ensure the correct configuration of the default data-type. And that's what this PR does😄
Testing this PR
Upgrade a default V13 database and verify that the data-type with ID -36 has the correct configuration: