View Issue Details

IDProjectCategoryView StatusLast Update
0023594mantisbtcustom fieldspublic2017-12-04 02:17
ReportervboctorAssigned 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

View 2 revisions

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-05 01:39:23

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
mod - bug_report.php Diff File
mod - core/cfdefs/cfdef_standard.php Diff File

MantisBT: master 751b3d35

2017-11-27 23:22:48

vboctor

Details Diff
Fix the call to `custom_field_set_value()`

Fixes 0023594
mod - bug_report.php Diff File

Issue History

Date Modified Username Field Change
2017-11-05 01:39 vboctor New Issue
2017-11-05 01:39 vboctor Status new => assigned
2017-11-05 01:39 vboctor Assigned To => vboctor
2017-11-05 14:02 vboctor Note Added: 0058139
2017-11-07 06:14 dregad Note Added: 0058154
2017-11-07 06:15 dregad Relationship added related to 0019482
2017-11-07 06:15 dregad Relationship added related to 0012602
2017-11-09 22:53 vboctor Changeset attached => MantisBT master 8b9b2a32
2017-11-09 22:53 vboctor Status assigned => resolved
2017-11-09 22:53 vboctor Resolution open => fixed
2017-11-09 22:53 vboctor Fixed in Version => 2.9.0
2017-11-16 11:02 atrol Status resolved => feedback
2017-11-16 11:02 atrol Resolution fixed => reopened
2017-11-16 11:02 atrol Note Added: 0058211
2017-11-16 11:03 atrol Note Edited: 0058211 View Revisions
2017-11-28 00:33 vboctor Note Added: 0058256
2017-11-28 05:17 atrol Note Added: 0058257
2017-11-28 12:09 vboctor Changeset attached => MantisBT master 751b3d35
2017-11-28 12:09 vboctor Status feedback => resolved
2017-11-28 12:09 vboctor Resolution reopened => fixed
2017-12-04 02:17 vboctor Status resolved => closed