|
Last change
on this file since 805 was
586,
checked in by gav, 15 years ago
|
|
Add taskGroup and detail to task search view, as per ticket #65.
New toShortString() to Entry domain class.
|
|
File size:
768 bytes
|
| Line | |
|---|
| 1 | class Entry { |
|---|
| 2 | Person enteredBy |
|---|
| 3 | Task task |
|---|
| 4 | EntryType entryType |
|---|
| 5 | ProductionReference productionReference |
|---|
| 6 | |
|---|
| 7 | String comment |
|---|
| 8 | Date dateDone = new Date() |
|---|
| 9 | Date dateEntered = new Date() |
|---|
| 10 | Integer durationHour = 0 |
|---|
| 11 | Integer durationMinute = 0 |
|---|
| 12 | |
|---|
| 13 | static belongsTo = [EntryType, Task, Person] |
|---|
| 14 | |
|---|
| 15 | static constraints = { |
|---|
| 16 | task() |
|---|
| 17 | comment(blank:false,maxSize:500) |
|---|
| 18 | dateDone() |
|---|
| 19 | durationHour(min:0,max:16) |
|---|
| 20 | durationMinute(min:0,max:59) |
|---|
| 21 | productionReference(nullable: true) |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | String toString() { |
|---|
| 25 | "${this.comment} - ${this.enteredBy}, ${this.dateDone}" |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | String toShortString() { |
|---|
| 29 | "${enteredBy.firstName} ${enteredBy.lastName} - ${durationHour}h : ${durationMinute}min" |
|---|
| 30 | } |
|---|
| 31 | } |
|---|
| 32 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.