← Back to team overview

gtg team mailing list archive

[Merge] lp:~nimit-svnit/gtg/bug-1102453 into lp:gtg

 

Nimit Shah has proposed merging lp:~nimit-svnit/gtg/bug-1102453 into lp:gtg.

Requested reviews:
  Gtg developers (gtg)
Related bugs:
  Bug #1102453 in Getting Things GNOME!: "hamster integration plugins crash when start a task"
  https://bugs.launchpad.net/gtg/+bug/1102453

For more details, see:
https://code.launchpad.net/~nimit-svnit/gtg/bug-1102453/+merge/155104

Fix for bug-1102453
made necessary changes as per change in API
-- 
https://code.launchpad.net/~nimit-svnit/gtg/bug-1102453/+merge/155104
Your team Gtg developers is requested to review the proposed merge of lp:~nimit-svnit/gtg/bug-1102453 into lp:gtg.
=== modified file 'CHANGELOG'
--- CHANGELOG	2013-03-09 16:59:30 +0000
+++ CHANGELOG	2013-03-23 17:03:21 +0000
@@ -17,6 +17,7 @@
     * Pep8ification of code, by Nimit Shah
     * Fix for bug #1141582: Crash on enabling hamster plugin, by Nimit Shah
     * System level global shortcut key for quick adding task, by Parin Porecha
+    * Fix for bug #1102453: Crash on starting a task on hamster, by Nimit Shah
 
 2012-11-06 Getting Things GNOME! 0.3
     * Hide tasks with due date someday, #931376

=== modified file 'GTG/plugins/hamster/hamster.py'
--- GTG/plugins/hamster/hamster.py	2013-03-03 07:27:26 +0000
+++ GTG/plugins/hamster/hamster.py	2013-03-23 17:03:21 +0000
@@ -18,6 +18,7 @@
 # -----------------------------------------------------------------------------
 
 from calendar import timegm
+import datetime
 import dbus
 import gtk
 import os
@@ -107,9 +108,11 @@
         tag_str = "".join([" ," + x for x in tag_candidates])
 
         # print '%s%s,%s%s'%(activity, category, description, tag_str)
-        hamster_id = self.hamster.AddFact(activity, tag_str, 0, 0,
-                                          category, description)
-
+        hamster_fact = activity + '@' + category + ',' + description
+        hamster_id = self.hamster.AddFact(hamster_fact,
+                                          timegm(datetime.date.today().
+                                          timetuple()),
+                                          0)
         ids = self.get_hamster_ids(task)
         ids.append(str(hamster_id))
         self.set_hamster_ids(task, ids)