GTG

Merge lp:~bertrand-rousseau/gtg/bugfix-1027844-start-date-not-fuzzy into lp:~gtg/gtg/old-trunk

Proposed by Bertrand Rousseau
Status: Merged
Merged at revision: 1226
Proposed branch: lp:~bertrand-rousseau/gtg/bugfix-1027844-start-date-not-fuzzy
Merge into: lp:~gtg/gtg/old-trunk
Diff against target: 45 lines (+8/-1)
2 files modified
CHANGELOG (+1/-0)
GTG/core/task.py (+7/-1)
To merge this branch: bzr merge lp:~bertrand-rousseau/gtg/bugfix-1027844-start-date-not-fuzzy
Reviewer Review Type Date Requested Status
Izidor Matušov code, running Approve
Lionel Dricot (community) Approve
Review via email: mp+119278@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Izidor Matušov (izidor) wrote :

I found a bug in your fix:

1) Open a task editor
2) Set start date to far future, e.g. 2020-01-01
3) Set due date to now or soon
4) Close and reopen the task

Instead of due date as fuzzy date, you get start date. Please, fix it.

review: Needs Fixing (running)
1226. By Bertrand Rousseau

Fix set_start_date as well to avoid automatic update when using fuzzy due dates

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :

Thanks for noticing that. It should be fixed now.

1227. By Bertrand Rousseau

Merge trunk

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Works fine for me. Merge accepted.

review: Approve
Revision history for this message
Izidor Matušov (izidor) wrote :

Works fine, merging

review: Approve (code, running)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CHANGELOG'
2--- CHANGELOG 2012-08-12 21:17:10 +0000
3+++ CHANGELOG 2012-08-12 23:59:20 +0000
4@@ -45,6 +45,7 @@
5 * Re-enabled support for gtg:// URI
6 * Fix for bug #1026400: script_pocketmod doesn't have execute permission
7 * Fix for bug #1027817: Export plugin: changing output format moves widgets up and down
8+ * Fix for bug #1027844: Fuzzy date shouldn't become start date
9
10 2012-02-13 Getting Things GNOME! 0.2.9
11 * Big refractorization of code, now using liblarch
12
13=== modified file 'GTG/core/task.py'
14--- GTG/core/task.py 2012-07-20 09:45:33 +0000
15+++ GTG/core/task.py 2012-08-12 23:59:20 +0000
16@@ -263,7 +263,9 @@
17 self.due_date = fulldate_obj
18 # if the task's start date happens later than the
19 # new due date, we update it
20+ # (except for fuzzy dates)
21 if self.get_start_date() != Date.no_date() and \
22+ not fulldate_obj.is_fuzzy() and \
23 self.get_start_date() > fulldate_obj:
24 self.set_start_date(fulldate)
25 if fulldate_obj != Date.no_date():
26@@ -290,7 +292,9 @@
27 sub.set_due_date(fulldate)
28 # if the child's start date happens later than
29 # the task's new due date, we update it
30+ # (except for fuzzy dates)
31 if sub.get_start_date() != Date.no_date() and \
32+ not fulldate_obj.is_fuzzy() and \
33 sub.get_start_date() > fulldate_obj:
34 sub.set_start_date(fulldate)
35 else:
36@@ -303,7 +307,9 @@
37
38 def set_start_date(self, fulldate):
39 self.start_date = Date(fulldate)
40- if Date(fulldate) > self.due_date and Date(fulldate) != Date.no_date():
41+ if Date(fulldate) != Date.no_date() and \
42+ not self.due_date.is_fuzzy() and \
43+ Date(fulldate) > self.due_date:
44 self.set_due_date(fulldate)
45 self.sync()
46

Subscribers

People subscribed via source and target branches

to status/vote changes: