Changeset 821


Ignore:
Timestamp:
Feb 23, 2011, 5:45:01 PM (9 years ago)
Author:
gav
Message:

Domain change, add ConditionSeverity.

Location:
trunk/grails-app
Files:
1 added
2 edited

Legend:

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

    r809 r821  
    1414    TaskRecurringSchedule taskRecurringSchedule
    1515    TaskProcedureRevision taskProcedureRevision
     16    ConditionSeverity highestSeverity
    1617
    1718    String description
     
    6263        taskRecurringSchedule(nullable:true)
    6364        taskProcedureRevision(nullable:true)
    64 
     65        highestSeverity(nullable:true)
    6566    }
    6667
  • trunk/grails-app/services/CreateDataService.groovy

    r809 r821  
    7171        createBaseMaintenancePolicies()
    7272        createBaseInventoryItemPurchaseTypes()
     73        createBaseConditionSeverity()
    7374
    7475        // Assets
     
    636637    }
    637638
     639    def createBaseConditionSeverity() {
     640
     641        // ConditionSeverity
     642        def conditionSeverity
     643
     644        // ConditionSeverity #1
     645        conditionSeverity = new ConditionSeverity(code: 'A',
     646                                                                            recommendation: 'Normal Monitoring').save(failOnError:true)
     647
     648        // ConditionSeverity #2
     649        conditionSeverity = new ConditionSeverity(code: 'B',
     650                                                                            recommendation: 'Increase Monitoring').save(failOnError:true)
     651
     652        // ConditionSeverity #3
     653        conditionSeverity = new ConditionSeverity(code: 'C',
     654                                                                            recommendation: 'Replace 2-6 weeks').save(failOnError:true)
     655
     656        // ConditionSeverity #4
     657        conditionSeverity = new ConditionSeverity(code: 'D',
     658                                                                            recommendation: 'Replace 1-2 weeks').save(failOnError:true)
     659    }
     660
    638661    def createDemoSuppliers() {
    639662
Note: See TracChangeset for help on using the changeset viewer.