When completing an issue, print info about any new issue created by recurrence.
This commit is contained in:
parent
7bccd83e23
commit
df854f864c
@ -1,6 +1,6 @@
|
||||
# Package
|
||||
|
||||
version = "4.16.0"
|
||||
version = "4.17.0"
|
||||
author = "Jonathan Bernard"
|
||||
description = "Personal issue tracker."
|
||||
license = "MIT"
|
||||
|
@ -207,10 +207,13 @@ proc list(ctx: CliContext, filter: Option[IssueFilter], states: Option[seq[Issue
|
||||
for state in states.get:
|
||||
ctx.loadIssues(state)
|
||||
if filter.isSome: ctx.filterIssues(filter.get)
|
||||
|
||||
# Show Done for just today if requested
|
||||
if state == Done and showToday:
|
||||
ctx.issues[Done] = ctx.issues[Done].filterIt(
|
||||
it.hasProp("completed") and
|
||||
sameDay(getTime().local, it.getDateTime("completed")))
|
||||
|
||||
stdout.write ctx.formatSection(ctx.issues[state], state, "", verbose)
|
||||
trace "listing complete"
|
||||
return
|
||||
@ -378,6 +381,9 @@ when isMainModule:
|
||||
if issue.hasProp("recurrence") and issue.getRecurrence.isSome:
|
||||
let nextIssue = ctx.tasksDir.nextRecurrence(issue.getRecurrence.get, issue)
|
||||
ctx.tasksDir.store(nextIssue, Todo)
|
||||
info "created the next recurrence:"
|
||||
stdout.writeLine ctx.formatIssue(nextIssue)
|
||||
|
||||
|
||||
issue.changeState(ctx.tasksDir, targetState)
|
||||
|
||||
|
@ -315,8 +315,8 @@ proc nextRecurrence*(tasksDir: string, rec: Recurrence, defaultIssue: Issue): Is
|
||||
|
||||
let newProps = newTable[string,string]()
|
||||
for k, v in baseIssue.properties:
|
||||
if k != "created" and k != "completed":
|
||||
newProps[k] = v
|
||||
if k != "completed": newProps[k] = v
|
||||
newProps["prev-recurrence"] = $baseIssue.id
|
||||
|
||||
result = Issue(
|
||||
id: genUUID(),
|
||||
|
@ -1 +1 @@
|
||||
const PIT_VERSION* = "4.16.0"
|
||||
const PIT_VERSION* = "4.17.0"
|
Loading…
x
Reference in New Issue
Block a user