Changeset 837 for trunk/grails-app


Ignore:
Timestamp:
Mar 3, 2011, 10:28:16 PM (14 years ago)
Author:
gav
Message:

Domain change, add highestSeverity to Entry, with custom validation.

Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/Entry.groovy

    r586 r837  
    33    Task task
    44    EntryType entryType
     5    ConditionSeverity highestSeverity
    56    ProductionReference productionReference
    67
     
    2021        durationMinute(min:0,max:59)
    2122        productionReference(nullable: true)
     23        // Nullable unless PM Entry Type.
     24        highestSeverity(nullable:true, validator: {val, obj ->
     25            if(val == null && (obj.entryType.id == 6))
     26                return 'not.nullable.for.pm.entry'
     27        })
    2228    }
    2329
  • trunk/grails-app/i18n/messages.properties

    r833 r837  
    175175    the target start date.
    176176
     177entry.highestSeverity.not.nullable.for.pm.entry=Please select a condition severity.
    177178entry.create.no.params=Please select a task, then add an entry.
    178179entry.create.no.params.ajax=Incorrect params supplied.
Note: See TracChangeset for help on using the changeset viewer.