ForumsQuestionsTask counts on Search tabs


Task counts on Search tabs
Author Message
PeterW 

Posted: Oct 20, 2010
Score: 0 Reference
The header shows "1 To-do sorted by Due-Date" (which is correct). I saved this search with another name but still no go.

So I deleted the search and recreated it from scratch and this time saved as Checked off = no and it worked (displayed (0)).

However as soon as I change it to Checked off = yes, the count disappears.


This message was edited Oct 20, 2010.
PeterW 

Posted: Oct 20, 2010
Score: 0 Reference
Just installed GreaseMonkey in FireFox and the behaviour is exactly the same - seems like checked off tasks can't be counted.
PeterW 

Posted: Oct 20, 2010
Score: 0 Reference
Just did some more playing with it...

It seems to be something to do with the date. If I set the search to one of the following:
 Date completed is yesterday
 Date completed is 20/10/2010 (which is yesterday's date)
...then a task count is displayed.

However if I set the search criteria to any of the following, the task count is not displayed:
 Date completed is today
 Date completed is 21/10/2010 (which is today's date)
 Date completed is after yesterday

So the script seems to have a problem with today's date. Not sure if it matters but my timezone is GMT+10 (Australia) and my date setting is dd/mm/yyyy in case that has any impact on your code?
piyush_soni

Posted: Oct 21, 2010
Score: 1 Reference
I got it. It's not so complicated. :) I started reading your posts bottom up, but as soon as I read "1 To-do sorted by Due-Date" I knew what was it. That's why I was always seeing some count, as I either had zero tasks, or more than one there. I did not think about singular and plural while creating my original regular expression, so 'to-dos' will match, 'to-do' will not. Resolved, install again. :)

This message was edited Oct 21, 2010.
PeterW 

Posted: Oct 21, 2010
Score: 0 Reference
Brilliant! Thanks again for your work on this. This little enhancement is an absolute gem.
piyush_soni

Posted: Oct 22, 2010
Score: 0 Reference
I just found out that ToodleDo itself doesn't do an update of tab count in the main views when clicked on any given tab(without a full reload), which is sort of weird. To test this, go to your All tasks, 'star' a few tasks temporarily. Note the count on the 'Starred' tab and then click that. You'd see that even though the status header shows correct number of starred tasks (which should be increased now), the tab count is still the same.
piyush_soni

Posted: Oct 26, 2010
Score: 1 Reference
Ok. To ease the pain on ToodleDo servers, I have made a few enhancements to the script. Now, below each Search Tab, you will find a seamlessly attached checkbox reading 'Show tab count for this search'. By default, tab counts for all search tabs is off. You just need to select the tabs you want to automatically show the count for (It will remember your settings). I think everyone should be happy with this. :P



Install again from the same link : ToodleDo Search Tab Counts

Edit : Besides ToodleDo servers, it is also beneficial for users as their important tabs will update the task counts faster.


This message was edited Oct 26, 2010.
PeterW 

Posted: Oct 26, 2010
Score: 0 Reference
Excellent! This is really great.

I've selected just three search tabs to display task counts: Inbox, Hotlist and Completed today.

What other cool things can you do, piyush_soni?
Technocrap

Posted: Oct 26, 2010
Score: 0 Reference
Posted by piyush_soni:

Wow thanks, that's clever.
PeterW 

Posted: Dec 18, 2010
Score: 0 Reference
@piyush_soni,

I've been using Chrome for quite a while but am back using FireFox at the moment, which updated itself to 3.6.13. I installed GreaseMonkey and then installed your script but for some reason it is not working in FireFox.

There are no errors or anything, it just isn't doing anything despite GM showing as being active and the script installed.

Any idea what might be wrong?
PeterW 

Posted: Dec 18, 2010
Score: 0 Reference
Oops... never mind. Forgot to turn on the checkboxes on each tab! Duh!!!
PeterW 

Posted: Dec 18, 2010
Score: 0 Reference
@piyush_soni,

Actually there is one thing I've been meaning to ask. When I return to the Search view from another tab, the script seems to randomly select one of the search tabs to display. Is there any way it can be made to remember what tab was last displayed? I think Toodledo normally does this itself but for some reason the script seems to over-ride this.
piyush_soni

Posted: Dec 19, 2010
Score: 0 Reference
Humm ... interesting. I never noticed that and don't deliberately do anything like that.

@ToodleDo, if you are reading this, is it the case that an xmlhttprequest made to your server with the search URL will make the server 'think' it was the last open tab?

Anyway, though currently there is no way 'as clean as I want' for solving this problem, I have updated a new version which should make sure you are in the same tab you were before doing all these background searches. I have tested it again in both Firefox and Chrome.

Note: This one time, please make sure to uninstall the previous version before installing the new one from the same link. This is because I have changed the script name to match to what is there on the webpage - so it might keep two copies and do weird stuff.
PeterW 

Posted: Dec 19, 2010
Score: 0 Reference
Thanks piyush_soni! Works great.

This script has been key to keeping me using Toodledo. In the Search view I can work from my custom Hotlist while seeing the number of tasks completed today and how many tasks are in my inbox waiting to be processed. It probably seems a small thing to many but for me, it helps me to focus and keep track of what I've done.
Dalker

Posted: Dec 20, 2010
Score: 0 Reference
Thanks for this script, piyush_soni, this is really useful! (I'm also one of the people who "live" in the Search views).
One small bug though: Currently if I make a new search, the script immediatly jumps to other search tabs and somehow this gets rid of the new search. Simple workaround; disable Greasemonkey while creating a new search.


This message was edited Dec 20, 2010.
piyush_soni

Posted: Dec 20, 2010
Score: 0 Reference
Thanks, glad it helps some people out there.
piyush_soni

Posted: Dec 20, 2010
Score: 0 Reference
Aaah ... Sorry Dalker, I wrote the above before seeing your message.

Yes, I see the problem you are talking about on my machine. This is the beauty of having multiple people testing your work - you can never test it all alone.

Will look into it next weekend, or much before that if I'm getting bored with my work. :)
piyush_soni

Posted: Dec 21, 2010
Score: 0 Reference
Ok. I looked into it, and it was an easy change. Actually, creating new search was working fine until I did the latest persistent tab changes. When we create a new search, it loads the search page again but the new search doesn't have any id (-1) so the script got confused what to switch to. It behaves correctly now.

You should install from the same link again.

Also, if you are using Firefox, now the script will automatically notify when a new version of this is available. Except this notification everything else should work in Chrome as well.
Dalker

Posted: Dec 21, 2010
Score: 0 Reference
Great! Thanks a lot for the update, and the update notification is a really nice feature too!
PeterW 

Posted: Dec 21, 2010
Score: 0 Reference
Thanks piyush_soni.
You cannot reply yet

U Back to topic home

R Post a reply

Skip to Page:  1   2      Next

To participate in these forums, you must be signed in.