Unusuall response from rtm.tasks.getList when using filter

49 views
Skip to first unread message

Jabanaki Software

unread,
Jul 5, 2011, 8:26:38 AM7/5/11
to remembert...@googlegroups.com
I am getting an unusually response when using the rtm.tasks.getList method with a filter. Using the same filter in the search field at rememberthemilk.com works fine, but from the API it only returns a "rev" attribute.

method = rtm.tasks.getList
filter = status:incomplete AND (dueBefore:today OR due:today)

response 
{"stat":"ok","tasks":{"rev":"xflbjlc4y680kc0sgwo448s4s0008o"}}

All of the expected tasks are due today, (i.e. none would match the dueBefore:today part of the filter)

However the weird thing is, after changing one of the tasks to have a have an earlier due date (to force the dueBefore:today part of the filter match something) the query worked as expected and returned the list of tasks. 

{"stat":"ok","tasks":{"list":[{"id":" ...etc 

Even weirder is that after changing the updated task back to being due today (i.e. all tasks are now due today), the query now works and I am unable reproduce the problem.

Steve

Kristian Domagala

unread,
Jul 14, 2011, 1:17:47 AM7/14/11
to remembert...@googlegroups.com
Hi Steve,

A response will typically be empty if the filter doesn't match anything (which doesn't appear to be the case, given that you tried the same filter on the web interface), or if the last_sync parameter is set and no matching tasks have changed since that timestamp. Can you confirm whether or not you are setting the last_sync parameter?

The rev value represents a revision "number" that is updated whenever data that could influence the tasks.getList results is changed. It can be used to determine whether anything has changed on the server between requests. I would expect the value to be set in the second result that you received - is it possible to check if that's the case?

Cheers,
Kristian.

Jabanaki Software

unread,
Jul 16, 2011, 11:17:26 AM7/16/11
to remembert...@googlegroups.com
I'm not passing the last_sync parameter, my app is getting the full list of tasks matching the query so I exclude the last_sync from the request.

I just checked the response I'm getting now and the "rev" attribute value is included in the full response. 

{"stat":"ok","tasks":{"rev":"1b0kij0y12kh8jwl9floja79x68ch7x","list":[{"id": ...

I do not recall seeing it before though, the example my initial post was cut and paste directly from the response, and didn't include the "rev" - or at least it wasn't it wasn't before the "list" element as I truncated the response.

I've not been able to reproduce the original issue.

Steve.

Jabanaki Software

unread,
Aug 2, 2011, 1:00:14 PM8/2/11
to remembert...@googlegroups.com
Just had the another, possible related with the same API query. I experienced it while using my app so wasn't able to capture the details of the API responses.

Using the same api call and filter adn before

method = rtm.tasks.getList
filter = status:incomplete AND (dueBefore:today OR due:today)

The results were showing two tasks, both of which had a due date prior to today. I ran the query multiple times, every time only getting the same two results. I then updated one of the tasks to change the due date to a future date, and then re-ran the same getList query and this time I got more results, three additional tasks with today's due date - these should have been in the original query results, but were not.

I'm wondering if there is a problem where the query is only matching the first part of the (dueBefore:today OR due:today) under some circumstances - or is there some result caching on the RTM api server, that only gets invalidated once a task is updated? 

This seems consistent with the initial problem described above. In that case I recall that there where no tasks matching the dueBefore:today which is probably why the result was just an empty set of tasks, and the due:today tasks only showed after a task was edited.

I hope this helps diagnose the underlying issue.

Steve.

Reply all
Reply to author
Forward
0 new messages