MantisBT: master efd8d1fb

Author Committer Branch Timestamp Parent
dregad dregad master 2021-01-31 09:00:39 master 9ec22096
Affected Issues  0027950: Validate date custom fields default value format
 0027956: Remove need to use {} for dynamic dates in custom fields default value
 0027983: Improve Custom Fields documentation
Changeset

Validate date custom fields default value format

Prior to saving the custom field's definition, we try to convert the
provided format to a date, and if that fails an error is thrown.

This also removes the need to enclose the format within curly brackets
(e.g. {tomorrow}); this is more user-friendly, and simplifies the code
as the given value can be passed on as-is to DateTime transformation.

Backwards-compatibility is maintained for now, but may be removed in a
future release.

Fixes 0027950, 0027956, 0027983

mod - core/cfdefs/cfdef_standard.php Diff File
mod - core/custom_field_api.php Diff File
mod - docbook/Admin_Guide/en-US/Customizing.xml Diff File