MCPcopy Create free account
hub / github.com/driangle/taskmd / buildTaskDetail

Function buildTaskDetail

apps/cli/internal/web/export.go:134–145  ·  view source on GitHub ↗
(t *model.Task)

Source from the content-addressed store, hash-verified

132}
133
134func 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
147func buildWorklogEntries(t *model.Task) []WorklogEntryJSON {
148 wlPath := worklog.WorklogPath(t.FilePath, t.ID)

Callers 1

generateTaskDetailFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected