Ticket #361 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

importer: setting a non existant value in a Stringlist does not result in an error

Reported by: work@… Owned by: t.w.abma@…
Priority: major Milestone: 0.7.0
Component: Import wizard Version: 0.6.6
Keywords: Cc:
Product: Operating system:
URL: Hardware:


When importing an excel sheet into a template field which is a Stringlist, a value that does not exist in the stringlist does not result in an error, but instead the first element in the stringlist select is 'selected'.

Expected behaviour: show an error, and feedback that the value is invalid (similar to ontology).

Change History

Changed 4 years ago by work@…


1. stringlist contains a,b,c
2. import d
3. a is selected and no warning is given that you tried to import an invalid value (d)

Changed 4 years ago by t.w.abma@…

  • status changed from new to assigned
  • owner changed from t.w.abma@… to work@…

Seems that this was working in the past, but now setting a value in an entity containing a STRINGLIST field doesn't seem to throw an exception anymore? This approach does work for ONTOLOGIES though.

I use a try/catch for setting a field and if a value cannot be set (in an ONTOLOGY field for example) I get an exception which I use to build up a list of fields that could not be set.

I do get an error in the log, but cannot catch this error. It would be nice if STRINGLIST also throws an exception when it fails to set a field.

"2011-03-21 17:59:52,834 [http-8080-2] ERROR studycapturing.Subject - Error casting Gender of type StringList? with value 28.02 (class java.lang.String) :: Stringlist item not recognized: 28.02"

Changed 4 years ago by work@…

  • owner changed from work@… to t.w.abma@…

resolved in gdt  r213 and in r1664

To receive an exception use setFieldValue(name, value, true) instead of setFieldValue(name, value)

Changed 4 years ago by t.w.abma@…

  • status changed from assigned to closed
  • resolution set to fixed

Solved in [215], now contains the invalid value as an option in the STRINGLIST selectbox.

Note: See TracTickets for help on using tickets.