Changeset 190
- Timestamp:
- Nov 19, 2009, 1:47:55 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/TaskDetailedController.groovy
r185 r190 171 171 172 172 def entryWorkDoneList = Entry.withCriteria { 173 def entryType = EntryType.findByName("WorkDone") 174 eq("entryType", entryType) 173 eq("entryType", EntryType.get(2)) 175 174 eq("task", taskInstance) 176 175 } 177 176 178 177 def entryFaultList = Entry.withCriteria { 179 def entryType = EntryType.findByName("Fault") 180 eq("entryType", entryType) 178 eq("entryType", EntryType.get(1)) 181 179 eq("task", taskInstance) 182 180 } -
trunk/grails-app/services/CreateDataService.groovy
r185 r190 560 560 def entryTypeInstance 561 561 562 entryTypeInstance = new EntryType(name:"Fault") 562 entryTypeInstance = new EntryType(name:"Fault") // #1 563 563 saveAndTest(entryTypeInstance) 564 564 565 entryTypeInstance = new EntryType(name:"Work Done")565 entryTypeInstance = new EntryType(name:"Work Done") // #2 566 566 saveAndTest(entryTypeInstance) 567 567 568 entryTypeInstance = new EntryType(name:"Production Note") 568 entryTypeInstance = new EntryType(name:"Production Note") // #3 569 569 saveAndTest(entryTypeInstance) 570 570 571 entryTypeInstance = new EntryType(name:"Work Request") 571 entryTypeInstance = new EntryType(name:"Work Request") // #4 572 572 saveAndTest(entryTypeInstance) 573 573 } … … 575 575 def createDemoEntries() { 576 576 577 //Entry578 def entryInstance577 def entryResult 578 def p = [:] 579 579 580 580 //Entry #1 581 entryInstance = new Entry(enteredBy: Person.get(3),582 task: Task.get(1),583 entryType: EntryType.findByName("Fault"),584 comment: "This level sensor is causing us trouble.",585 durationMinute: 20) 586 saveAndTest(entryInstance)581 p = [task: Task.get(1), 582 entryType: EntryType.get(1), 583 comment: "This level sensor is causing us trouble.", 584 durationMinute: 20] 585 586 entryResult = taskService.createEntry(p) 587 587 588 588 //Entry #2 589 entryInstance = new Entry(enteredBy: Person.get(4),590 task: Task.get(1),591 entryType: EntryType.findByName("WorkDone"),592 comment: "Cleaned sensor, see how it goes.",593 durationMinute: 30) 594 saveAndTest(entryInstance)589 p = [task: Task.get(1), 590 entryType: EntryType.get(2), 591 comment: "Cleaned sensor, see how it goes.", 592 durationMinute: 30] 593 594 entryResult = taskService.createEntry(p) 595 595 596 596 //Entry #3 597 entryInstance = new Entry(enteredBy: Person.get(4),598 task: Task.get(1),599 entryType: EntryType.findByName("WorkDone"),600 comment: "Checked up on it later and sensor is dropping out intermittently, created subTask to replace sensor.",601 durationMinute: 20) 602 saveAndTest(entryInstance)597 p = [task: Task.get(1), 598 entryType: EntryType.get(2), 599 comment: "Checked up on it later and sensor is dropping out intermittently, created sub task to replace sensor.", 600 durationMinute: 20] 601 602 entryResult = taskService.createEntry(p) 603 603 } 604 604
Note: See TracChangeset
for help on using the changeset viewer.