Opened 14 years ago

Closed 13 years ago

#2534 closed bug (fixed)

avoid the possibility to enter -in attributes table- strings/numbers beyond the field length

Reported by: lutra Owned by: sunilkcube
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Vectors Version: Trunk
Keywords: Cc:
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

Description

Actually you can enter values in the attributes table with a length that is > of the field length. This can be source of problems as a users can be mislead to believe the field has room for more chars/numbers than has really.

Fixing this will also indirectly fix another bug:

if the attributes table has only one row and you edit it, if you enter a value that has more chars/numbers than allowed by the field length, when you toggle editing to save changes, the value is not immediately truncated leading to believe that that particular edit went fine.

Attachments (4)

patch_for_bug_#2534.txt (4.8 KB ) - added by sunilkcube 13 years ago.
patch_for_bug_#2534.diff (4.8 KB ) - added by sunilkcube 13 years ago.
patch_for_bug_2534_new.diff (5.3 KB ) - added by sunilkcube 13 years ago.
New patch file
Corrected_patch_for_bug_#2534.diff (5.1 KB ) - added by sunilkcube 13 years ago.
Corrected patch contains all corrections mentioned by jef

Download all attachments as: .zip

Change History (12)

comment:1 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

comment:2 by volter, 14 years ago

The second part of the issue seems to be solved with 1.6.

comment:3 by sunilkcube, 13 years ago

Owner: changed from nobody to sunilkcube
Status: newassigned

by sunilkcube, 13 years ago

Attachment: patch_for_bug_#2534.txt added

by sunilkcube, 13 years ago

Attachment: patch_for_bug_#2534.diff added

comment:4 by sunilkcube, 13 years ago

I have attached the patch file, Kindly reply your comments.

in reply to:  4 ; comment:5 by jef, 13 years ago

Replying to sunilkcube:

I have attached the patch file, Kindly reply your comments.

Looks good.

Just two things:

  1. the validator only returns Invalid or Acceptable, while the child validators might als return Intermediate.
  2. There doesn't seem to be support for (the configurable string representation of) NULL. If the value is some not yet complete part of NULL the validator should also return Intermediate and ignore the size limitations in that case.

in reply to:  5 comment:6 by sunilkcube, 13 years ago

Replying to jef:

Thank you very much for your valuable comments. I have attached a new patch file. Can you kindly verify whether the file carries all the necessary changes you have mentioned above and Will you please reply me in case of further changes?.

by sunilkcube, 13 years ago

Attachment: patch_for_bug_2534_new.diff added

New patch file

by sunilkcube, 13 years ago

Corrected patch contains all corrections mentioned by jef

comment:7 by sunilkcube, 13 years ago

Cc: jef@… added

comment:8 by jef, 13 years ago

Cc: jef@… removed
Resolution: fixed
Status: assignedclosed

applied heavly modified in r15566. Thanks.

Note: See TracTickets for help on using tickets.