A read-only weekly (or other period) view of a worker's logged hours, built by TimesheetManager. Combines the worker's timesheet entries for the period with their assigned tasks and leads, any free text labels used in the preceding two weeks, and any caller-supplied standard items, so the grid shows every relevant work item even for days with no hours logged. Rows are the work items and columns are the days in the period; use getHours to read the hours logged for a given day and item.
Properties
| Property | Returns | Description |
|---|---|---|
| days | List<Date> | The days covered by this timesheet, sorted in ascending order, including days with no hours logged. |
| entries | List<TimesheetEntry> | The raw timesheet entries this view was built from. |
| finishDate | Date | The latest day covered by this timesheet. |
| startDate | Date | The earliest day covered by this timesheet. |
| workItems | List<Object> | The work items shown as rows in this timesheet: a mix of Task, Lead and free text label entries, sorted with tasks first, then leads, then labels. |
Methods
getDays()
Returns: List<Date>
The days covered by this timesheet, sorted in ascending order, including days with no hours logged.
getWorkItems()
Returns: List<Object>
The work items shown as rows in this timesheet: a mix of Task, Lead and free text label entries, sorted with tasks first, then leads, then labels.
getEntries()
Returns: List<TimesheetEntry>
The raw timesheet entries this view was built from.
getHours(Date day, Object item)
Returns: Double
The hours logged for the given day against the given work item.
| Parameter | Description |
|---|---|
day | the day to look up, matched against the start of that day |
item | the work item to look up, as returned by getWorkItems |
addItems(Iterable<String> items)
Returns: void
Adds free text labels as extra work item rows, skipping any label already present.
| Parameter | Description |
|---|---|
items | the labels to add as work items |
getStartDate()
Returns: Date
The earliest day covered by this timesheet.
getFinishDate()
Returns: Date
The latest day covered by this timesheet.