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
=== modified file 'CHANGELOG'
--- CHANGELOG 2012-08-12 21:17:10 +0000
+++ CHANGELOG 2012-08-12 23:59:20 +0000
@@ -45,6 +45,7 @@
45 * Re-enabled support for gtg:// URI45 * Re-enabled support for gtg:// URI
46 * Fix for bug #1026400: script_pocketmod doesn't have execute permission46 * Fix for bug #1026400: script_pocketmod doesn't have execute permission
47 * Fix for bug #1027817: Export plugin: changing output format moves widgets up and down47 * Fix for bug #1027817: Export plugin: changing output format moves widgets up and down
48 * Fix for bug #1027844: Fuzzy date shouldn't become start date
4849
492012-02-13 Getting Things GNOME! 0.2.9502012-02-13 Getting Things GNOME! 0.2.9
50 * Big refractorization of code, now using liblarch51 * Big refractorization of code, now using liblarch
5152
=== modified file 'GTG/core/task.py'
--- GTG/core/task.py 2012-07-20 09:45:33 +0000
+++ GTG/core/task.py 2012-08-12 23:59:20 +0000
@@ -263,7 +263,9 @@
263 self.due_date = fulldate_obj263 self.due_date = fulldate_obj
264 # if the task's start date happens later than the 264 # if the task's start date happens later than the
265 # new due date, we update it265 # new due date, we update it
266 # (except for fuzzy dates)
266 if self.get_start_date() != Date.no_date() and \267 if self.get_start_date() != Date.no_date() and \
268 not fulldate_obj.is_fuzzy() and \
267 self.get_start_date() > fulldate_obj:269 self.get_start_date() > fulldate_obj:
268 self.set_start_date(fulldate)270 self.set_start_date(fulldate)
269 if fulldate_obj != Date.no_date():271 if fulldate_obj != Date.no_date():
@@ -290,7 +292,9 @@
290 sub.set_due_date(fulldate)292 sub.set_due_date(fulldate)
291 # if the child's start date happens later than293 # if the child's start date happens later than
292 # the task's new due date, we update it294 # the task's new due date, we update it
295 # (except for fuzzy dates)
293 if sub.get_start_date() != Date.no_date() and \296 if sub.get_start_date() != Date.no_date() and \
297 not fulldate_obj.is_fuzzy() and \
294 sub.get_start_date() > fulldate_obj:298 sub.get_start_date() > fulldate_obj:
295 sub.set_start_date(fulldate)299 sub.set_start_date(fulldate)
296 else:300 else:
@@ -303,7 +307,9 @@
303307
304 def set_start_date(self, fulldate):308 def set_start_date(self, fulldate):
305 self.start_date = Date(fulldate)309 self.start_date = Date(fulldate)
306 if Date(fulldate) > self.due_date and Date(fulldate) != Date.no_date():310 if Date(fulldate) != Date.no_date() and \
311 not self.due_date.is_fuzzy() and \
312 Date(fulldate) > self.due_date:
307 self.set_due_date(fulldate)313 self.set_due_date(fulldate)
308 self.sync()314 self.sync()
309315

Subscribers

People subscribed via source and target branches

to status/vote changes: