Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
1bc287fa
Commit
1bc287fa
authored
Jan 12, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! X Draft support for date modifier
due:=XXX was not properly taken into account in e.g. `due:<=1m` filter.
parent
37dfac74
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
topydo/commands/PostponeCommand.py
topydo/commands/PostponeCommand.py
+2
-1
topydo/lib/Filter.py
topydo/lib/Filter.py
+10
-1
topydo/lib/Recurrence.py
topydo/lib/Recurrence.py
+1
-0
No files found.
topydo/commands/PostponeCommand.py
View file @
1bc287fa
...
...
@@ -43,6 +43,7 @@ class PostponeCommand(MultiCommand):
def
_execute_multi_specific
(
self
):
def
_get_offset
(
p_todo
):
# FIXME handle due modifiers
offset
=
p_todo
.
tag_value
(
config
().
tag_due
(),
date
.
today
().
isoformat
())
...
...
@@ -75,7 +76,7 @@ class PostponeCommand(MultiCommand):
self
.
error
(
"Warning: todo item has no (valid) start date, therefore it was not adjusted."
)
# pylint: disable=E1103
todo
.
set_tag
(
config
().
tag_due
(),
new_due
.
isoformat
())
todo
.
set_tag
(
config
().
tag_due
(),
new_due
.
isoformat
())
# FIXME preserve due flags
self
.
todolist
.
dirty
=
True
self
.
out
(
self
.
printer
.
print_todo
(
todo
))
...
...
topydo/lib/Filter.py
View file @
1bc287fa
...
...
@@ -283,7 +283,16 @@ class OrdinalTagFilter(OrdinalFilter):
return resort_to_grep_filter()
try:
operand1 = date_string_to_date(p_todo.tag_value(self.key))
# due: and t: can have modifiers
if self.key == 'due':
_ = p_todo.due_date()
elif self.key == 't':
_ = p_todo.start_date()
else:
_ = date_string_to_date(p_todo.tag_value(self.key))
if _ is None:
raise ValueError
operand1 = _
operand2 = relative_date_to_date(self.value)
if not operand2:
...
...
topydo/lib/Recurrence.py
View file @
1bc287fa
...
...
@@ -62,6 +62,7 @@ def advance_recurring_todo(p_todo, p_offset=None, p_strict=False):
raise
NoRecurrenceException
()
# pylint: disable=E1103
# FIXME preserve due modifiers
todo
.
set_tag
(
config
().
tag_due
(),
new_due
.
isoformat
())
if
todo
.
start_date
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment