View Issue Details

IDProjectCategoryView StatusLast Update
0023594mantisbtcustom fieldspublic2017-12-04 02:17
Reportervboctor Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.8.0 
Target Version2.9.0Fixed in Version2.9.0 
Summary0023594: Reporting an issue with default date {now} that is not visible doesn't work
Description

The issue should be created with custom field set to today's date, but it gets created with literal string {now} that can't be displayed later. The fix would be resolve {now} at reporting time and fix display of existing issues by showing empty date.

TagsNo tags attached.

Relationships

related to 0019482 closedvboctor Using custom fields (date) with default value and required on resolve displays an error 
related to 0012602 closedvboctor Default value for a date don't work 

Activities

vboctor

vboctor

2017-11-05 14:02

manager   ~0058139

PR: https://github.com/mantisbt/mantisbt/pull/1228

dregad

dregad

2017-11-07 06:14

developer   ~0058154

@vboctor please check whether your proposed patch also fixes 0019482 and maybe 0012602 too.

atrol

atrol

2017-11-16 11:02

developer   ~0058211

Last edited: 2017-11-16 11:03

This is the signature of

function gpc_get_custom_field( $p_var_name, $p_custom_field_type, $p_default = null )

But it's called now as

gpc_get_custom_field( 'custom_field_' . $t_id,
        $t_def['type'], custom_field_default_to_value( $t_def['default_value'], $t_def['type'] ), false )

Obviously wrong as it's called with 4 parameters instead of 3.

I assume the last false should be a parameter of the custom_field_set_value call.

vboctor

vboctor

2017-11-28 00:33

manager   ~0058256

@atrol the calling issue is fixed via https://github.com/mantisbt/mantisbt/pull/1245

atrol

atrol

2017-11-28 05:17

developer   ~0058257

Reviewed, tested and approved the PR.

Related Changesets

MantisBT: master 8b9b2a32

2017-11-04 21:39

vboctor


Details Diff
Fix handling custom date fields with value `{now}`

The issue should be created with custom field set to today's date,
but it gets created with literal string {now} that can't be displayed
later. The fix would be resolve {now} at reporting time and fix display
of existing issues by showing empty date.

This applies to issues created via web ui when the date field is not
visible on reporting page.

Fixes 0023594
Affected Issues
0023594
mod - bug_report.php Diff File
mod - core/cfdefs/cfdef_standard.php Diff File

MantisBT: master 751b3d35

2017-11-27 18:22

vboctor


Details Diff
Fix the call to `custom_field_set_value()`

Fixes 0023594
Affected Issues
0023594
mod - bug_report.php Diff File