(t *model.Task)
| 132 | } |
| 133 | |
| 134 | func buildTaskDetail(t *model.Task) TaskDetail { |
| 135 | detail := TaskDetail{Task: t, Body: t.Body} |
| 136 | wlPath := worklog.WorklogPath(t.FilePath, t.ID) |
| 137 | if worklog.Exists(wlPath) { |
| 138 | if wl, err := worklog.ParseWorklog(wlPath); err == nil && len(wl.Entries) > 0 { |
| 139 | detail.WorklogEntries = len(wl.Entries) |
| 140 | last := wl.Entries[len(wl.Entries)-1] |
| 141 | detail.WorklogUpdated = last.Timestamp.Format("2006-01-02T15:04:05Z07:00") |
| 142 | } |
| 143 | } |
| 144 | return detail |
| 145 | } |
| 146 | |
| 147 | func buildWorklogEntries(t *model.Task) []WorklogEntryJSON { |
| 148 | wlPath := worklog.WorklogPath(t.FilePath, t.ID) |
no outgoing calls
no test coverage detected