Ignore:
Timestamp:
Jul 27, 2010, 12:07:32 PM (6 years ago)
Author:
keesvb
Message:

enabled boolean field recognition of 'x', added SamplingEvent? field addition to ImporterService?

File:
1 edited

Legend:

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

    r662 r725  
    420420                // Convenience setter for boolean fields
    421421                if( field.type == TemplateFieldType.BOOLEAN && value && value.class == String ) {
    422                         if (value.equals("true") || value.equals("on")) {
     422                        def lower = value.toLowerCase()
     423                        if (lower.equals("true") || lower.equals("on") || lower.equals("x")) {
    423424                                value = true
    424425                        }
    425                         else if (value.equals("false") || value.equals("off")) {
     426                        else if (lower.equals("false") || lower.equals("off") || lower.equals("")) {
    426427                                value = false
    427428                        }
Note: See TracChangeset for help on using the changeset viewer.