Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357631 - DefaultFormDataValidator should consider handling of 0/null for smartfields
Summary: DefaultFormDataValidator should consider handling of 0/null for smartfields
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-14 09:44 EDT by Stephan Merkli CLA
Modified: 2021-08-19 11:25 EDT (History)
3 users (show)

See Also:
zimmermann: juno+


Attachments
Patch to fix issue (3.71 KB, patch)
2011-09-14 10:00 EDT, Ivan Motsch CLA
zimmermann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Merkli CLA 2011-09-14 09:44:43 EDT
Build Identifier: M20110210-1200

Form with smartfields where getConfiguredTreat0AsNull is true (default).
A value of 0 is not accepted as input when a store method is called (validiation rule 'process'). 

This is not a problem when the data is loaded into form data (from database), imported to form, exported to formdata and then stored, because the value is then changed to null (instead of 0).

When directly loading into form data and storing this form data afterwards, the value 0 is not accept.

Reproducible: Always

Steps to Reproduce:
see detail description.
Comment 1 Ivan Motsch CLA 2011-09-14 10:00:05 EDT
Created attachment 203336 [details]
Patch to fix issue
Comment 2 Ivan Motsch CLA 2011-09-14 10:01:12 EDT
Applied patch provided by Stephan Merkli.
The else clause with the throw was not patched, since if the value is not numeric, a normal validation should take place instead. Not a premature failure.
Comment 3 Matthias Zimmermann CLA 2012-05-23 10:59:42 EDT
moved iplog flag to patch
Comment 4 Matthias Zimmermann CLA 2012-05-23 11:00:07 EDT
Comment on attachment 203336 [details]
Patch to fix issue

added iplog flag for patch from stefan merkli
Comment 5 Matthias Zimmermann CLA 2012-07-09 06:49:58 EDT
ticket closed.
deliverd as part of eclipse scout 3.8.0 (juno release train)