Damien Elmes 2019-12-11 08:12:50 +10:00
parent bb62a3c1af
commit 7f2fecb944

View file

@ -1056,14 +1056,11 @@ due = (case when odue>0 then odue else due end), odue = 0, odid = 0, usn = ? whe
t = "n.id"
elif o == DYN_REVADDED:
t = "n.id desc"
elif o == DYN_DUE:
t = "c.due"
elif o == DYN_DUEPRIORITY:
t = "(case when queue=2 and due <= %d then (ivl / cast(%d-due+0.001 as real)) else 100000+due end)" % (
self.today, self.today)
else:
# if we don't understand the term, default to due order
t = "c.due"
else: # DYN_DUE or unknown
t = "c.due, c.ord"
return t + " limit %d" % l
def _moveToDyn(self, did, ids, start=-100000):