Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357631

Summary: DefaultFormDataValidator should consider handling of 0/null for smartfields
Product: z_Archived Reporter: Stephan Merkli <stephan.merkli>
Component: ScoutAssignee: Project Inbox <scout.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ivan.motsch, stephan.merkli, zimmermann
Version: unspecifiedFlags: zimmermann: juno+
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Patch to fix issue zimmermann: iplog+

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)