GTG

Dbus method new_task does not work

Bug #494397 reported by Zunbeltz Izaola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
Fix Released
High
Unassigned

Bug Description

new_task method accepts only string for the duedate, startdate and donedate arguments. But the set_due_date method in task.py (line 192) and related methods only accept instances of Date. So the following crash message appears:

org.freedesktop.DBus.Python.AssertionError: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/hmi/gtg/GTG/core/dbuswrapper.py", line 110, in new_task
    nt.set_due_date(duedate)
  File "/hmi/gtg/GTG/core/task.py", line 193, in set_due_date
    assert(isinstance(fulldate, Date))
AssertionError

Conversion from string should be provided in the set_due_date (and related methods). Not only for the real dates, but also for fuzzy dates and no_dates.

Tags: dbus
Changed in gtg:
milestone: none → 0.2
Changed in gtg:
status: New → Confirmed
importance: Undecided → High
Changed in gtg:
assignee: nobody → Lionel Dricot (ploum)
status: Confirmed → In Progress
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

fixed in rev. 463

 DBUS interface still uses our old dates. We should have unit
tests for that, really. Thanks Zunbeltz for being our first DBus user! Sorry
for the bugs, we will correct that. Please continue to report bug, we appreciate it :-)

Changed in gtg:
status: In Progress → Fix Committed
Revision history for this message
Zunbeltz Izaola (zunbeltz) wrote :

Thanks for the quick fix. I would continue testint. I already suspect that i found another bug :-)

Changed in gtg:
status: Fix Committed → Fix Released
Revision history for this message
Zunbeltz Izaola (zunbeltz) wrote :

I think this commit was reverted in r509.
So it should be reopened.

Changed in gtg:
status: Fix Released → Confirmed
Changed in gtg:
milestone: 0.2 → 0.2.1
Revision history for this message
Zunbeltz Izaola (zunbeltz) wrote :

I look in the code changes of rev460 and rev509. I do not understand why it was reverted,
the only explanation is in the commit message of rev509. Any idea what is the problem?

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

I checked and it works fine. Also, the code was not reverted at all (rev 509 only change the way modules are loaded).

tested with new_task("Active", "dbus task", "now", "2009-12-31", '', '', "blablabla", '') and it worked fine.

Maybe you have a different issue? If so, please open a new bug and attach the dbus script that trigger the bug

Changed in gtg:
status: Confirmed → Fix Committed
Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.