add relative overdueness option
This commit is contained in:
parent
b49d52393e
commit
492ed33f4d
@ -36,6 +36,7 @@ DYN_LAPSES = 4
|
||||
DYN_ADDED = 5
|
||||
DYN_DUE = 6
|
||||
DYN_REVADDED = 7
|
||||
DYN_DUEPRIORITY = 8
|
||||
|
||||
# model types
|
||||
MODEL_STD = 0
|
||||
@ -83,4 +84,5 @@ def dynOrderLabels():
|
||||
5: _("Order added"),
|
||||
6: _("Order due"),
|
||||
7: _("Latest added first"),
|
||||
8: _("Relative overdueness"),
|
||||
}
|
||||
|
@ -967,6 +967,9 @@ due = odue, odue = 0, odid = 0, usn = ?, mod = ? where %s""" % lim,
|
||||
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 10000+due end)" % (
|
||||
self.today, self.today)
|
||||
else:
|
||||
# if we don't understand the term, default to due order
|
||||
t = "c.due"
|
||||
|
Loading…
Reference in New Issue
Block a user