Ignore:
Timestamp:
Feb 28, 2010, 7:13:47 PM (14 years ago)
Author:
gav
Message:

Add attentionFlag to Task domain along with views and logic to suite.
Add entry type 'cause', refactor as required.
Refactor task types.
Move createBreakin to createImmediateCallout.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/CreateDataService.groovy

    r402 r418  
    685685        def taskTypeInstance
    686686
    687         taskTypeInstance = new TaskType(name:"Unscheduled Breakin") // #1
     687        taskTypeInstance = new TaskType(name:"Immediate Callout") // #1
    688688        saveAndTest(taskTypeInstance)
    689689
    690         taskTypeInstance = new TaskType(name:"Preventative Maintenance") // #2
     690        taskTypeInstance = new TaskType(name:"Unscheduled Breakin") // #2
    691691        saveAndTest(taskTypeInstance)
    692692
    693         taskTypeInstance = new TaskType(name:"Project") // #3
     693        taskTypeInstance = new TaskType(name:"Scheduled") // #3
    694694        saveAndTest(taskTypeInstance)
    695695
    696         taskTypeInstance = new TaskType(name:"Turnaround") // #4
     696        taskTypeInstance = new TaskType(name:"Preventative Maintenance") // #4
    697697        saveAndTest(taskTypeInstance)
    698698
    699         taskTypeInstance = new TaskType(name:"Production Run") // #5
     699        taskTypeInstance = new TaskType(name:"Predictive Maintenance") // #5
     700        saveAndTest(taskTypeInstance)
     701
     702        taskTypeInstance = new TaskType(name:"Project") // #6
    700703        saveAndTest(taskTypeInstance)
    701704    }
     
    716719        taskModificationTypeInstance = new TaskModificationType(name:"Modified (Assigned Groups)").save()  // #10
    717720        taskModificationTypeInstance = new TaskModificationType(name:"Modified (Assigned Persons)").save()  // #11
     721        taskModificationTypeInstance = new TaskModificationType(name:"Modified (Flagged for attention)").save()  // #12
     722        taskModificationTypeInstance = new TaskModificationType(name:"Modified (Attention flag cleared)").save()  // #13
    718723    }
    719724
     
    728733                taskType:TaskType.get(1),
    729734                leadPerson:Person.get(2),
    730                 description:"Check specific level sensor",
     735                description:"Level sensor not working",
    731736                comment:"Has been noted as problematic, try recalibrating.",
    732737                targetStartDate: dateUtilService.today]
     
    737742        p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
    738743                taskPriority:TaskPriority.get(2),
    739                 taskType:TaskType.get(1),
     744                taskType:TaskType.get(3),
    740745                leadPerson:Person.get(5),
    741746                description:"Some follow-up work",
     
    749754        p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
    750755                taskPriority:TaskPriority.get(2),
    751                 taskType:TaskType.get(1),
     756                taskType:TaskType.get(3),
    752757                leadPerson:Person.get(5),
    753                 description:"A Sub Task can be created from the Sub Task's tab.",
     758                description:"A Sub Task can be created from the 'Sub Task' tab.",
    754759                comment:"Some help required",
    755760                targetStartDate: dateUtilService.yesterday,
     
    761766        p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
    762767                 taskPriority:TaskPriority.get(2),
    763                  taskType:TaskType.get(1),
     768                 taskType:TaskType.get(2),
    764769                 leadPerson:Person.get(4),
    765                  description:"Replace sensor at next opportunity.",
    766                  comment:"Nothing else has worked.",
     770                 description:"Please replace sensor at next available opportunity.",
     771                 comment:"Nothing else has worked. So we now require the part to be replaced.",
    767772                targetStartDate: dateUtilService.oneWeekFromNow,
    768773                parentTask: Task.get(1)]
     
    773778        p = [taskGroup:TaskGroup.findByName("Production Activites"),
    774779                 taskPriority:TaskPriority.get(2),
    775                  taskType:TaskType.get(5),
     780                 taskType:TaskType.get(3),
    776781                 leadPerson:Person.get(6),
    777                  description:"Production Report",
    778                  comment:"Production report for specific production run or shift",
     782                 description:"Production Task",
     783                 comment:"Production task for specific production run or shift",
    779784                targetStartDate: dateUtilService.today - 6]
    780785
     
    783788        //Task #6
    784789        p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
    785                  taskPriority:TaskPriority.get(1),
    786                  taskType:TaskType.get(2),
     790                 taskPriority:TaskPriority.get(4),
     791                 taskType:TaskType.get(3),
    787792                 leadPerson:Person.get(4),
    788                  description:"This is a recurring task",
     793                 description:"This is a recurring preventative maintenance task.",
    789794                 comment:"If there is a parent task specified then this is a generated sub task, if there is a recurring schedule specified then this is a parent task.",
    790795                targetStartDate: dateUtilService.today]
     
    801806        saveAndTest(entryTypeInstance)
    802807
    803         entryTypeInstance = new EntryType(name:"Work Done") // #2
     808        entryTypeInstance = new EntryType(name:"Cause") // #2
    804809        saveAndTest(entryTypeInstance)
    805810
    806         entryTypeInstance = new EntryType(name:"Production Note") // #3
     811        entryTypeInstance = new EntryType(name:"Work Done") // #3
    807812        saveAndTest(entryTypeInstance)
    808813
    809         entryTypeInstance = new EntryType(name:"Work Request") // #4
     814        entryTypeInstance = new EntryType(name:"Production Note") // #4
     815        saveAndTest(entryTypeInstance)
     816
     817        entryTypeInstance = new EntryType(name:"Work Request") // #5
    810818        saveAndTest(entryTypeInstance)
    811819    }
     
    826834        //Entry #2
    827835        p = [task: Task.get(1),
    828                 entryType: EntryType.get(2),
     836                entryType: EntryType.get(3),
    829837                comment: "Cleaned sensor, see how it goes.",
    830838                durationMinute: 30]
     
    834842        //Entry #3
    835843        p = [task: Task.get(1),
    836                 entryType: EntryType.get(2),
     844                entryType: EntryType.get(3),
    837845                comment: "Checked up on it later and sensor is dropping out intermittently, created sub task to replace sensor.",
    838846                durationMinute: 20]
     
    933941        saveAndTest(inventoryLocation)
    934942
    935         inventoryLocation = new InventoryLocation(inventoryStore: InventoryStore.get(1), name: "C55")
     943        inventoryLocation = new InventoryLocation(inventoryStore: InventoryStore.get(2), name: "C55")
    936944        saveAndTest(inventoryLocation)
    937945    }
Note: See TracChangeset for help on using the changeset viewer.