Ignore:
Timestamp:
Apr 9, 2010, 11:02:10 AM (9 years ago)
Author:
tabma
Message:
  • changed search for Stringlist items to case-insensitive (reading lowercase 'male' from Excel failed to match 'Male' in the Gender Stringlist)
  • added trimming to the valueformatter in the importer service
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateEntity.groovy

    r332 r333  
    263263                else {
    264264                        // Find the target template field, if not found, throw an error
    265                         TemplateField field = this.template.fields.find { it.name == fieldName}
     265                        TemplateField field = this.template.fields.find { it.name == fieldName }
    266266                        if (field == null) {
    267267                                throw new NoSuchFieldException("Field ${fieldName} not found in class properties or template fields")
     
    271271                                // Convenience setter for template string list fields: find TemplateFieldListItem by name
    272272                                if (field.type == TemplateFieldType.STRINGLIST && value.class == String) {
    273                                         value = field.listEntries.find { it.name == value }
     273                                        value = field.listEntries.find { it.name ==~ /(?i)($value)/ }
    274274                                }
    275275
Note: See TracChangeset for help on using the changeset viewer.