Work view should refresh itself periodically

Bug #514926 reported by Bryce Harrington on 2010-01-30
70
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Getting Things GNOME!
High
Atit Anand

Bug Description

-implement a core timer class ticking every half an hour and at midnight
- make the browser refresh at midnight
- make a plugin function
- register the cleanup plugin to that
I usually leave the Work View on all the time except when I'm doing planning work. In the morning when I sit down at the computer, I notice that it still shows the work view for the prior day. Weirdly, the task count next to 'All tasks' is different - it's the correct total of bugs for the current day.

I think gtg should automatically refresh its work view periodically (maybe once every hour or two) if it is left idle.

Changed in gtg:
status: New → Confirmed
importance: Undecided → Medium
Luca Invernizzi (invernizzi) wrote :

I'm interested in solving this one.
Question: we have the need to run some code periodically in different places (this one, the cleanup feature, possibly the "alarm" thingie). Should we implement a single signal that "ticks" every half an hour or so or everything gets its own custom timer?

Pro custom:
- not having custom timers isn't like reimplementing the timer?

Against custom:
- code is more understandable
- recurring events can be turned on/off easily

Changed in gtg:
assignee: nobody → Luca Invernizzi (invernizzi)

On Tue, Feb 16, 2010 at 10:08:35PM -0000, Luca Invernizzi wrote:
> I'm interested in solving this one.
> Question: we have the need to run some code periodically in different places (this one, the cleanup feature, possibly the "alarm" thingie). Should we implement a single signal that "ticks" every half an hour or so or everything gets its own custom timer?

It does seem like a general need. Could be useful for metrics gathering
too. If this were provided as a core service for plugins to register for, it
could be quite handy.

Luca Invernizzi (invernizzi) wrote :

Ok, then. If anyone is against this, speak now. I'll start implementing it no sooner than tomorrow for sure (and most probably later than that).

Changed in gtg:
status: Confirmed → Triaged
description: updated
Changed in gtg:
milestone: none → 0.3
assignee: Luca Invernizzi (invernizzi) → nobody
Changed in gtg:
milestone: 0.3 → 0.4
Izidor Matušov (izidor) on 2011-08-12
tags: added: refresh

A simple solution (without custom timer) is to register appropriate refresh callbacks using gobject.timeout_add():

http://www.pygtk.org/pygtk2reference/gobject-functions.html#function-gobject--timeout-add

This will also provide a fix for the color changing feature of the notification area plugin (bug #1001012). As discussed there, the icon doesn't get colored on upcoming urgent tasks if GTG remains open overnight or the computer is suspended/hibernated.

If you agree on the simple strategy above, I am willing to work on this. Perhaps this could be targeted already for 0.3.1?

Izidor Matušov (izidor) wrote :

Hi Antonio,

we think we should go with the custom timer and gobject.timeout_add(). Emit a signal at every 30th and 60th minute of the hour, i.e. 8:00, 8:30, 9:00, 9:30, etc... Everybody who needs to be refreshed, can connect to the signal.

You can start working on this now. There are no officially selected bugs for 0.3.1. We need to bug triaging, reevaluate bugs (if they are already fixed, if they are still relevant and if we want to fix them). Nevertheless, if you fix a bug which is targeted at the later version and we accept the patch, the bug will be target to the current development version :)

Have fun coding this feature!

OK Izidor, I'll see what I can do :-)

Anyway, this won't fix the following scenario: suspend/hibernate the computer at 23:45, open it at 8:05. Tasks won't be updated until 8:30. Actually I am not sure how timeout_add() will behave in this case.

Changed in gtg:
assignee: nobody → Antonio Roquentin (antonio-roquentin)
Izidor Matušov (izidor) wrote :

I am not sure how it is implemented, but I think the timeout should be
triggered. Play with it and you'll see.

Izidor Matušov (izidor) on 2012-09-27
Changed in gtg:
importance: Medium → High
Changed in gtg:
assignee: Antonio Roquentin (antonio-roquentin) → Atit Anand (atit-anand-cs)
Nimit Shah (nimit-svnit) on 2014-03-14
Changed in gtg:
status: Triaged → In Progress
Izidor Matušov (izidor) wrote :
Changed in gtg:
status: In Progress → Fix Committed
milestone: 0.4 → 0.3.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers