View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010184 | mantisbt | custom fields | public | 2009-03-05 11:37 | 2009-06-26 12:04 |
Reporter | Chi-Yu | Assigned To | jreese | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.1.6 | ||||
Target Version | 1.1.8 | Fixed in Version | 1.1.8 | ||
Summary | 0010184: APPLICATION ERROR 0001303 when optional custom date field is left blank | ||||
Description | We defined an optional custom date field "due date". When reporting a new bug, Mantis throws an "APPLICATION ERROR 0001303". The field is NOT mandatory and even after removing the field from the bug report page by unchecking the according checkbox, Mantis still says that the field "due date" contains an invalid value. I just updated our mantis installation using nightly build "mantisbt-1.1.6-2009-03-01-master-1.1.x-f461da7.tar.gz" and this problem is still present. So we are currently unable to submit any new bugs unless we fill in some random due date. | ||||
Steps To Reproduce |
| ||||
Tags | custom fields, date | ||||
This seems to be related to 0009979. |
|
Reminder sent to: grangeway, thraxisp Glenn, not sure if this has anything to do with what you've fixed previously, but it seems like it's related. |
|
I have same problem with 1.1.6 stable and same with mantisbt-1.1.6-2009-04-14-master-1.1.x-4593490.zip |
|
I am not seeing this in master-1.1.x HEAD. Can I mark it resolved? |
|
Hi, The error seems to exist in master-1.1.x HEAD (45934909ad91f08127876f69dbde381a40ae843a). The function custom_field_validate($p_field_id, $p_value) returns false when $p_value is null and $t_type is CUSTOM_FIELD_TYPE_DATE. -- |
|
The problem still exists in version 1.1.7. To solve the problem I have changed in file core/custom_field_api.php the function custom_field_validate. The case CUSTOM_FIELD_TYPE_DATE has to be adapted from |
|
Tested the workaround provided from maximini, works. Well.. at least i can submit new issues again. ;) |
|
The solution suggested in 0010184:0021684 seems to work. |
|
Thanks for sharing the fix maximini (fix applied to v1.1.7). |
|
I've replicated both the problem and the resolution in both 1.1.x and 1.2.x. Fix committed to master-1.1.x and master branches. |
|
I just upgraded to Mantis 1.1.7 from 1.1.6 in attempts to correct the inability to update custom date fields. That problem is fixed, but this problem and the fix suggested in 0010184:0021684 didn't help me with my optional custom date fields. With the code fix in place, I still get Application Error 1303 when I try to submit a new bug where I did not complete the optional due date field. I also have the LongCF plugin installed, which may or may not be interacting with this (not sure). But I also noticed that my optional Checkbox ON/OFF field that comes as part of the LongCF package also gets the same error now if I don't check the box and put some value in this field. Of course, that defeats the purpose of a checkbox field if I always have to check it. I am running php 5.2.6-1 on Debian Lenny with kernel 2.5.26-2 on AMD 64-bit. For now I had to put a blanket "return true" statement as the first line in the custom_field_validate function in order to bypass all validation checking as there appears to be something more wrong with this custom field validation than just date fields (like an odd interaction with LongCF plugin that I'm not able to pin down). |
|
As to the LongCF not working with date validation see this http://forum.morinie.fr/mantis/read.php?6,4051 maybe it helps. |
|
MantisBT: master 205681da 2009-05-11 10:17 Details Diff |
Fix 0010184: Properly validate null values for custom date fields. |
Affected Issues 0010184 |
|
mod - core/custom_field_api.php | Diff File | ||
MantisBT: master-1.1.x 86ea1ec7 2009-05-11 10:17 Details Diff |
Fix 0010184: Properly validate null values for custom date fields. |
Affected Issues 0010184 |
|
mod - core/custom_field_api.php | Diff File |