fix(tasks): don't include undone overdue tasks from archived lists or namespaces in notification mails
Resolves https://kolaente.dev/vikunja/api/issues/1324
This commit is contained in:
parent
fbc4b91e0f
commit
47aae115df
@ -337,6 +337,7 @@
|
||||
bucket_id: 20
|
||||
created: 2018-12-01 01:12:04
|
||||
updated: 2018-12-01 01:12:04
|
||||
due_date: 2018-10-30 22:25:24
|
||||
- id: 37
|
||||
title: 'task #37'
|
||||
done: false
|
||||
|
@ -37,7 +37,9 @@ func getUndoneOverdueTasks(s *xorm.Session, now time.Time) (usersWithTasks map[i
|
||||
|
||||
var tasks []*Task
|
||||
err = s.
|
||||
Where("due_date is not null and due_date < ?", nextMinute.Add(time.Hour*14).Format(dbTimeFormat)).
|
||||
Where("due_date is not null AND due_date < ? AND lists.is_archived = ? AND namespaces.is_archived = ?", nextMinute.Add(time.Hour*14).Format(dbTimeFormat), false, false).
|
||||
Join("INNER", "lists", "lists.id = tasks.list_id").
|
||||
Join("INNER", "namespaces", "lists.namespace_id = lists.id").
|
||||
And("done = false").
|
||||
Find(&tasks)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user