View Issue Details

IDProjectCategoryView StatusLast Update
0003526mantisbtcustom fieldspublic2019-09-26 16:41
Reporterchrisj Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Platformi386OSLinux/KDE 
Summary0003526: Custom field regular expression doesn
Description

I created a custom field (Library Version) and added the following regular expression to the field:
^[0-9]{1,2}(.[0-9]{1,2}(.[0-9]{1,2})?)?$

When creating a new bug, entering an invalid value (such as 1.2.3.4) into the field and hitting 'Submit' correctly generates the message "APPLICATION ERROR 0001303 Invalid value for field". However, a bug record is still created with an empty 'Library Version' field. If the user hits the 'Back' button and fixes the problem and resubmits, a second bug record is created, leaving two bug reports for the same bug, one of which has an invalid custom field.

Steps To Reproduce

Create custom string field with regular expression.
Link custom string field to a project.
Submit a new bug using an invalid string for the string field.
Click 'View Bugs' to see extra bug record.

TagsNo tags attached.

Relationships

duplicate of 0016952 new When reporting issue receive error on custom field, but issue is still created 

Activities

vboctor

vboctor

2004-02-03 14:21

manager   ~0004943

Last edited: 2011-12-11 21:52

View 2 revisions

The problem is that the report bug does the following:

  • Adds the bug
  • Attaches any files
  • Sets the custom fields (errors are triggered here!)

So, if the custom field validation yields an error, then the bug is already added! There are two options:

  • Delete the bug if an error is found (in this case no creation/deletion notifications are to be sent. Problem: skips a bug id, probably less efficient.
  • Validate the custom fields before adding the bug. Problem: will not solve the case where attaching a file causes an error.
obstbaum80

obstbaum80

2011-11-14 09:57

reporter   ~0030231

Last edited: 2011-12-11 21:52

How about performing the validations via javascript before even submitting the bug?

Issue History

Date Modified Username Field Change
2004-01-23 21:28 chrisj New Issue
2004-02-03 14:21 vboctor Note Added: 0004943
2004-02-08 03:43 vboctor Status new => assigned
2004-02-08 03:43 vboctor Assigned To => vboctor
2004-02-08 03:43 vboctor Category bugtracker => custom fields
2004-02-08 03:43 vboctor Description Updated
2004-02-08 03:43 vboctor Steps to Reproduce Updated
2011-11-14 09:57 obstbaum80 Note Added: 0030231
2011-12-11 21:52 vboctor Note Edited: 0004943 View Revisions
2011-12-11 21:52 vboctor Note View State: 0004943: public
2011-12-11 21:52 vboctor Note View State: 0030231: public
2011-12-11 21:52 vboctor Assigned To vboctor =>
2011-12-11 21:52 vboctor Status assigned => new
2011-12-11 21:52 vboctor Product Version 0.18.0 =>
2011-12-11 21:52 vboctor Summary Custom field regular expression doesn't prevent invalid bug entry => Custom field regular expression doesn
2011-12-11 21:52 vboctor Description Updated View Revisions
2011-12-11 21:52 vboctor Steps to Reproduce Updated View Revisions
2017-08-19 21:40 cproensa Relationship added duplicate of 0016952
2019-09-17 08:17 dregad Assigned To => dregad
2019-09-17 08:17 dregad Status new => resolved
2019-09-17 08:17 dregad Resolution open => duplicate
2019-09-26 16:41 atrol Status resolved => closed