View Issue Details

IDProjectCategoryView StatusLast Update
0025981mantisbtotherpublic2022-02-26 05:52
Reporterjzero Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.21.1 
Fixed in Version2.25.0 
Summary0025981: Custom Field doesn't complete with {today} when closing or resolving
Description

Hello. Found this bug when trying to implement a closing date for tickets. The custom field works correctly when used for creating a ticket but not for closing or resolving.

Steps To Reproduce

Create Custom Field with

  • Type: Date
  • Default Value: {today}
  • Check all the required options.

Close (or change status to resolved) a ticket. The custom field will be empty.

Create a ticket, the custom field will appear with today date.

TagsNo tags attached.

Activities

bmason

bmason

2022-02-14 11:49

reporter   ~0066241

I am seeing this behavior as well in 2.22.2. Are there any plans to fix?
This function is useful for automatically recording the Closed Date or Fixed Date. I know that the bug history has its own dates, but that does not allow us to output the dates in an excel export or show the dates in an issues list.

dregad

dregad

2022-02-14 17:11

developer   ~0066242

Last edited: 2022-02-14 17:16

Can you please try this with >= 2.25.0

I believe this issue may have been fixed as a side effect of MantisBT master efd8d1fb (see 0027950)

jzero

jzero

2022-02-15 10:56

reporter   ~0066243

Yes, is fixed now (2.25.1)

Thanks!

dregad

dregad

2022-02-15 12:39

developer   ~0066244

Thanks for confirming!

Related Changesets

MantisBT: master efd8d1fb

2021-01-31 04:00

dregad


Details Diff
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
Affected Issues
0025981, 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