From c6adf925641c7b7ec8b05f6d57fb48fddbf9c3de Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Fri, 15 Dec 2023 22:10:17 -0600 Subject: [PATCH] Ignore issues completed more than 60 days in the past to allow archiving old Trello lists. --- src/pit2trello.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pit2trello.nim b/src/pit2trello.nim index 1dadc33..a5331a5 100644 --- a/src/pit2trello.nim +++ b/src/pit2trello.nim @@ -102,8 +102,10 @@ proc syncContext( let board = s.boards[ctx.boardId] - let issues = s.issues.find( - propsFilter(newTable([("context", ctx.context)]))) + var issueFilter = initFilter() + issueFilter.completedRange = some((now() - 60.days, now())) + issueFilter.properties = newTable([("context", ctx.context)]) + let issues = s.issues.find(issueFilter) let cards: seq[tuple[list: TrelloListSummary, card: TrelloCard]] = board.lists.pairs.toSeq -->