diff options
| author | Nikolaus Gotsche <n@softwarefools.com> | 2019-03-13 12:45:50 +0100 |
|---|---|---|
| committer | Nikolaus Gotsche <n@softwarefools.com> | 2019-03-13 12:45:50 +0100 |
| commit | ef18e31975eb998bdc4ed922c7b77281721d08d4 (patch) | |
| tree | 01fda3c15e84dbab528fa2643f81c97f695cdd46 /sqlite.go | |
| parent | 42de2ad0f38780094b923b31e573387a5e0e3e11 (diff) | |
Comments are shown when charging, already charged Tasks shown
Diffstat (limited to 'sqlite.go')
| -rw-r--r-- | sqlite.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -940,6 +940,16 @@ func GetSelectedProjects(in []int) (out []Project) { return } +// Return the Comments of all selected Tasks if they exist as a []string +func GetSelectedComments(in []Task) (comms []string) { + for _,tsk := range in { + if len(tsk.Comment) > 0{ + comms = append(comms,fmt.Sprintf("%s - %s",tsk.Taskname,tsk.Comment)) + } + } + return +} + // Return the []tasks corresponding to an []int of task ids func GetSelectedTasks(in []int) (outtask []Task) { ins := strings.Trim(strings.Replace(fmt.Sprint(in), " ", " , ", -1), "[]") |
