View Issue Details

IDProjectCategoryView StatusLast Update
0011628mantisbtcustom fieldspublic2010-04-23 14:30
Reporterhansj Assigned Todhx  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0 
Target Version1.2.1Fixed in Version1.2.1 
Summary0011628: Error 0001303 / Custom Field (Checkbox) evaluated as mandantory even when it is not
Description

We use a checkbox custom field which is normaly unset.
Since the latest version of Mantis 1.2.0 (1.2.0 2010-03-08-master-1.2.x-402d897) we get an error if we do not set the checkbox. "APPLICATION ERROR 0001303"
Value for the checkbox is "Ja" (string).
Of course the checkbox isn't set to be mandanory.

TagsNo tags attached.

Relationships

related to 0011610 closeddhx Regular expressions to validate custom list field 
has duplicate 0006891 closeddhx Problem having custom checkbox field required 
has duplicate 0006610 closeddhx Checkbox custom field and required status 
related to 0011684 closedvboctor Incorrect error "A necessary field "MyField" was empty. Please recheck your inputs." when submitting new issue 

Activities

hansj

hansj

2010-03-08 10:29

reporter   ~0024670

has been working in mantisbt-1.2.0-2010-03-02-master-1.2.x-3cca927

hansj

hansj

2010-03-08 10:38

reporter   ~0024671

It might be possible that with implementing a new eval function s/o forget the case that a value is not set (and is allowed to be unset).
This might also affect other custom field types
see /core/custom_field_api.php, 1173cc

                   $t_values = explode( '|', $p_value );
                   $t_possible_values = custom_field_prepare_possible_values( $row['possible_values'] );
                   $t_possible_values = explode( '|', $t_possible_values );
                   $t_invalid_values = array_diff( $t_values, $t_possible_values );
                   $t_valid &= ( count( $t_invalid_values ) == 0 );
                   break;
atrol

atrol

2010-03-08 11:25

developer   ~0024673

Please check whether this was introduced by the changes you made for the related bug

dhx

dhx

2010-03-12 07:26

reporter   ~0024705

Yep, my bad. I've patched it at long last.

Checkboxes and other custom field types are now properly validated upon reporting and updating issues.

They should also work properly with filtering as well now :)

Related Changesets

MantisBT: master 375a337d

2010-03-12 06:42

dhx


Details Diff
Various custom field validation, filtering and performance fixes

This commit is a roll-up of various bug fixes related to custom field
implementations within MantisBT. In particular, multilist, checkbox and
radio fields now work as expected when creating and updating bug reports
as well as upon filtering on these custom field types.

Fix 0011628: Checkbox custom field should allow no selections
Fix 0011561: Reimplement an earlier patch to improve performance
Fix 0011610: Reimplement custom field validation logic (see 0011628)
Affected Issues
0010482, 0011561, 0011610, 0011628
mod - api/soap/mc_issue_api.php Diff File
mod - core/custom_field_api.php Diff File
mod - core/cfdefs/cfdef_standard.php Diff File
mod - bug_update.php Diff File
mod - bug_report.php Diff File
mod - core/filter_api.php Diff File

MantisBT: master-1.2.x bbe690f3

2010-03-12 06:42

dhx


Details Diff
Various custom field validation, filtering and performance fixes

This commit is a roll-up of various bug fixes related to custom field
implementations within MantisBT. In particular, multilist, checkbox and
radio fields now work as expected when creating and updating bug reports
as well as upon filtering on these custom field types.

Fix 0011628: Checkbox custom field should allow no selections
Fix 0011561: Reimplement an earlier patch to improve performance
Fix 0011610: Reimplement custom field validation logic (see 0011628)
Affected Issues
0010482, 0011561, 0011610, 0011628
mod - bug_report.php Diff File
mod - core/custom_field_api.php Diff File
mod - api/soap/mc_issue_api.php Diff File
mod - bug_update.php Diff File
mod - core/cfdefs/cfdef_standard.php Diff File
mod - core/filter_api.php Diff File