View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027914 | mantisbt | custom fields | public | 2021-01-26 04:11 | 2021-03-07 18:28 |
Reporter | aaribaud | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.24.4 | ||||
Target Version | 2.25.0 | Fixed in Version | 2.25.0 | ||
Summary | 0027914: Custom date field with default value left blank even when field is required | ||||
Description | When a custom date field is configured to:
then:
| ||||
Steps To Reproduce | Create a custom date field with a default of '{today}' | ||||
Additional Information | The most sensible fix would be to compute and apply the default value for a custom date field, not only on creation, but also on updates or status changes if the field is still unset but has become required. | ||||
Tags | No tags attached. | ||||
After some testing with ticket workflow and digging in the database, I get to the following conclusions:
The combination of the above results in the following: if an unset custom date field (due to 2) must be displayed and is required, then it will be displayed empty (due to 3) but that empty value won't be allowed (due to 4). In that precise case, I think it would make sense to apply the default value regardless of the ticket state, before displaying the field. |
|
MantisBT: master 9d6e1de9 2021-01-19 00:32 Committer: dregad Details Diff |
Apply default value for required but unset custom date fields When updating or changing the state of an issue, if a custom date field is required yet unset but has a default value, then pre-fill the field with the default value instead of leaving it blank. Fixes 0027914 Signed-off-by: Albert ARIBAUD <albert.aribaud@free.fr> |
Affected Issues 0027914 |
|
mod - core/custom_field_api.php | Diff File |