Changeset 66
- Timestamp:
- Mar 7, 2009, 4:32:03 AM (16 years ago)
- Location:
- branches/TaskRewrite/src
- Files:
-
- 50 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/TaskRewrite/src/grails-app/conf/BootStrap.groovy
r64 r66 83 83 personInstance.addToAuthorities(Authority.get(1)) 84 84 personInstance.addToAuthorities(Authority.get(2)) 85 85 personInstance.addToPersonGroups(PersonGroup.findByName("gnuMims")) 86 86 87 87 personInstance = new Person(loginName:"user", … … 92 92 BootStrapSaveAndTest(personInstance) 93 93 personInstance.addToAuthorities(Authority.get(2)) 94 94 personInstance.addToPersonGroups(PersonGroup.findByName("Electrical")) 95 95 96 96 personInstance = new Person(loginName:"craig", … … 101 101 BootStrapSaveAndTest(personInstance) 102 102 personInstance.addToAuthorities(Authority.get(2)) 103 103 personInstance.addToPersonGroups(PersonGroup.findByName("Electrical")) 104 104 105 105 personInstance = new Person(loginName:"joe", … … 110 110 BootStrapSaveAndTest(personInstance) 111 111 personInstance.addToAuthorities(Authority.get(2)) 112 112 personInstance.addToPersonGroups(PersonGroup.findByName("Mechanical")) 113 113 114 114 personInstance = new Person(loginName:"mann", … … 119 119 BootStrapSaveAndTest(personInstance) 120 120 personInstance.addToAuthorities(Authority.get(2)) 121 personInstance.addToPersonGroups(PersonGroup.findByName("Production")) 122 121 personInstance.addToPersonGroups(PersonGroup.findByName("Production")) 122 123 //TaskStatus 124 def taskStatusInstance 125 126 taskStatusInstance = new TaskStatus(name:"Not Started") 127 BootStrapSaveAndTest(taskStatusInstance) 128 129 taskStatusInstance = new TaskStatus(name:"In Progress") 130 BootStrapSaveAndTest(taskStatusInstance) 131 132 taskStatusInstance = new TaskStatus(name:"Completed") 133 BootStrapSaveAndTest(taskStatusInstance) 134 123 135 //TaskGroup 124 // new TaskGroup(name:"Engineering", 125 // description:"Engineering task group").save() 126 // new TaskGroup(name:"Production", 127 // description:"Production task group").save() 128 // new TaskGroup(name:"NewProject(s)", 129 // description:" ").save() 130 131 136 def taskGroupInstance 137 138 taskGroupInstance = new TaskGroup(name:"Engineering Activites", 139 description:"Engineering daily activities") 140 BootStrapSaveAndTest(taskGroupInstance) 141 142 taskGroupInstance = new TaskGroup(name:"Production Activites", 143 description:"Production daily activities") 144 BootStrapSaveAndTest(taskGroupInstance) 145 146 taskGroupInstance = new TaskGroup(name:"NewProject(s)", 147 description:" ") 148 BootStrapSaveAndTest(taskGroupInstance) 149 132 150 //Task 133 // new Task(taskGroup:TaskGroup.findByName("Engineering"), 134 // leadPerson:Person.get(3), 135 // name:"Check specific level sensor", 136 // description:"Has been noted as problematic, try recallibrating", 137 // scheduledDate: new Date(), 138 // targetDate: new Date() ).save() 139 // new Task(taskGroup:TaskGroup.findByName("Production"), 140 // leadPerson:Person.get(5), 141 // name:"Production Report", 142 // description:"Production report for specific production run or shift", 143 // scheduledDate: new Date(), 144 // targetDate: new Date() ).save() 145 // new Task(taskGroup:TaskGroup.findByName("NewProject(s)"), 146 // leadPerson:Person.get(1), 147 // name:"Make killer CMMS app", 148 // description:"Use Grails and get a move on!", 149 // scheduledDate: new Date(), 150 // targetDate: new Date() ).save() 151 def taskInstance 152 153 taskInstance = new Task(taskGroup:TaskGroup.findByName("Engineering Activites"), 154 taskStatus:TaskStatus.findByName("Not Started"), 155 leadPerson:Person.get(3), 156 description:"Check specific level sensor", 157 comment:"Has been noted as problematic, try recallibrating") 158 BootStrapSaveAndTest(taskInstance) 159 taskInstance.addToAssignedPersons(Person.get(1)) 160 taskInstance.addToAssignedPersons(Person.get(2)) 161 162 taskInstance = new Task(taskGroup:TaskGroup.findByName("Production Activites"), 163 taskStatus:TaskStatus.findByName("Not Started"), 164 leadPerson:Person.get(5), 165 description:"Production Report", 166 comment:"Production report for specific production run or shift") 167 BootStrapSaveAndTest(taskInstance) 168 169 taskInstance = new Task(taskGroup:TaskGroup.findByName("NewProject(s)"), 170 taskStatus:TaskStatus.findByName("Not Started"), 171 leadPerson:Person.get(1), 172 description:"Make killer CMMS app", 173 comment:"Use Grails and get a move on!") 174 BootStrapSaveAndTest(taskInstance) 151 175 152 176 //EntryType 153 // new EntryType(name:"Fault").save() 154 // new EntryType(name:"WorkDone").save() 155 // new EntryType(name:"Production Report").save() 177 def entryTypeInstance 178 179 entryTypeInstance = new EntryType(name:"Fault") 180 BootStrapSaveAndTest(entryTypeInstance) 181 182 entryTypeInstance = new EntryType(name:"WorkDone") 183 BootStrapSaveAndTest(entryTypeInstance) 184 185 entryTypeInstance = new EntryType(name:"Production Report") 186 BootStrapSaveAndTest(entryTypeInstance) 187 188 entryTypeInstance = new EntryType(name:"Work Request") 189 BootStrapSaveAndTest(entryTypeInstance) 156 190 157 191 //ModificationType 158 // new ModificationType(name:"Created").save() 159 // new ModificationType(name:"Completed").save() 160 // new ModificationType(name:"Closed").save() 161 // new ModificationType(name:"Altered").save() 162 // new ModificationType(name:"TargetDateModified").save() 163 // new ModificationType(name:"ScheduledDateModified").save() 164 // new ModificationType(name:"DescriptionModified").save() 165 // new ModificationType(name:"AssignedToModified").save() 166 // new ModificationType(name:"NameModified").save() 192 def modificationTypeInstance 193 modificationTypeInstance = new ModificationType(name:"Created").save() 194 modificationTypeInstance = new ModificationType(name:"Completed").save() 195 modificationTypeInstance = new ModificationType(name:"Closed").save() 196 modificationTypeInstance = new ModificationType(name:"Altered").save() 197 modificationTypeInstance = new ModificationType(name:"TargetDateModified").save() 198 modificationTypeInstance = new ModificationType(name:"ScheduledDateModified").save() 199 modificationTypeInstance = new ModificationType(name:"DescriptionModified").save() 200 modificationTypeInstance = new ModificationType(name:"AssignedToModified").save() 201 modificationTypeInstance = new ModificationType(name:"NameModified").save() 167 202 168 203 if(BootStrapDemoDataSuccessful) { -
branches/TaskRewrite/src/grails-app/domain/Person.groovy
r59 r66 2 2 static transients = ['pass'] 3 3 static hasMany = [authorities: Authority, 4 personGroups: PersonGroup ]5 //modifications: Modification,6 //entries: Entry,7 //tasks: Task]4 personGroups: PersonGroup, 5 modifications: Modification, 6 entries: Entry, 7 tasks: Task] 8 8 9 9 static belongsTo = [Authority, PersonGroup]
Note: See TracChangeset
for help on using the changeset viewer.