ForumsTips & TricksGreasemonkey script to edit multiple tasks


Greasemonkey script to edit multiple tasks
Author Message
papagayo

Posted: Sep 09, 2010
Score: 3 Reference
I wrote a Greasemonkey script that allows you to 'star' the tasks you want to edit, then edit the due-date for those tasks. Hope someone finds it useful. It's a rough draft, but working well for me. Let me know if you have any issues.

http://userscripts.org/scripts/show/85745

I may add more functionality in the future, so please post suggestions.
papagayo

Posted: Sep 10, 2010
Score: 0 Reference
It occurred to me that some people might actually use stars for something important, so I updated this script to add an additional checkbox for each task. Now you can just use the checkbox to specify which tasks to edit.

Starred items are ignored.

Times can also be specified if preferences are set to display due times.
Captain_Obvious

Posted: Sep 11, 2010
Score: 1 Reference
Just WOW, I think it was the most requested feature.

I my eyes you've added more usefulness to Toodledo than the dev himself during a year.
Do you accept donations ?

Preliminary observations :

Overdue, select "no date" tasks.
Postpone, works wonderful.
Starred tab, Clever idea.
Input parsing : Borrowed ... No shame ;)

views53bm.js beautified.


This message was edited Sep 11, 2010.
papagayo

Posted: Sep 11, 2010
Score: 0 Reference
Thanks for the input. I'm glad you like the script. I posted a new version to fix the "Overdues selects tasks with no due-date" issue. Thanks for pointing that out.

I also put in a function to select tasks with no-due-date, but I'm not sure how useful this is. The additional link for this function crowds the area where I put the links. So, I left the function in, but commented it out. If you want this link, scroll to the bottom of the script and uncomment the line the reads:

addLink("action_showdetails", selectAllTaskWithNoDueDates, "Select All Tasks With No Due Date", "No Due Date");


I'm glad you like it. Please keep the feedback coming. I've been thinking about a few things:
--Set priority for multiple items - shouldn't be too difficult
--Edit Context for multiple items (but not sure how I want to implement it..show a div with a dropdown box of existing contexts and a text input to create a new context?)


This message was edited Sep 11, 2010.
papagayo

Posted: Sep 11, 2010
Score: 0 Reference
Okay, new version:

--Add links to select tasks by priority ("Negative | Low | Medium | High | Top")
--Add links to change priority of selected tasks
--Add option to refresh tasks after each edit (set value of "REFRESH_AFTER_EDIT" in script source)



Please try it out and let me know how it works for you. Full list of features below:


Includes options to postpone all selected tasks by one day, by "x" days or set due date with a string ("today", "tomorrow", "Monday", "12/31/2010 1pm", "7am today", "5 days").

* Adds a checkbox to each task (just before the task title). Check this box to select the task for editing.

* Adds links to select "None | All | Overdue | Today | Tomorrow | Negative | Low | Medium | High | Top"

* Adds links to set due date for selected tasks:
o "Postpone" (defaults to postponse selected tasks by one day)
o "Postpone x Days" (prompts you to enter number of days to postpone selected tasks)
o "Set Due Date" (prompts you to enter due date for selected tasks)

* Adds links to set priority for selected tasks ("Negative" | Low | Medium | High | Top")

* Also overrides some keyboard shortcuts:
o "p": postpone all selected events by one day
o "x": postpone all selected events by "x" days (prompt)
o "d": set due date for all selected tasks with a string (prompt)
o "m": go to due-date screen (since "d" is overridden)
o "a": select all tasks
o "c": de-select all tasks ('esc' also works)

* Adds a tab for a "starred" saved-search, to quickly multi-edit starred tasks. Edit the script, changing the value of "STARRED_SEARCH_ID" to the value in the saved-search URL ("xxxxx" in "http://www.toodledo.com/views/search.php?i=xxxxx")


This message was edited Sep 11, 2010.
Linden

Posted: Sep 11, 2010
Score: 0 Reference
I can't get this script to work. I first tried to run it in combination with "ToodleDo Me Too" and when that didn't work, I disabled "ToodleDo Me Too". Either way, I don't see the check box. Any hints or can do something to capture debug?
papagayo

Posted: Sep 11, 2010
Score: 0 Reference
Just a thought, have you refreshed the ToodleDo Screen after disabling the other script? You may already know this, but you must refresh (preferably with "ctrl-F5") after enabling/disabling Greasemonkey scripts.

If you've tried that already, then let's try this...in Firefox, if you click on Tools in the menu bar, is there an option for Error Console? If so, can you do the following:

1. Go to Tools --> Error Console
2. Click "Clear"
3. Click "All" (in the upper left)
4. Back in Firefox, refresh the ToodleDo screen
5. Go back to the Error Console and print the output here


This message was edited Sep 11, 2010.
Linden

Posted: Sep 11, 2010
Score: 0 Reference
With or without your script, I see lots of warnings, but no errors or messages in either case. Do you want to see the warnings? They are identical with/without.

BTW, is there an easy way to capture the output from the error console? I don't see a way to copy the info into the clipboard.
papagayo

Posted: Sep 11, 2010
Score: 0 Reference
hmmm...hadn't thought that about that. I guess it's not easy to gather output from the Error Console.

So, let's do some debugging...in Firefox, right-click the Greasemonkey icon (lower-right) --> "Manage User Scripts" --> select my script --> "Edit"

Search for "function insertEditCheckboxes". The first line of the method is "var divs = $$("div.row[id] span.task");" Just after this line, insert "alert(divs);". Save the file, then refresh ToodleDo.

Let me know if you see the dialog pop up, and if there's any text in there or not. You should be able to highlight --> Ctrl-C to copy the text.
papagayo

Posted: Sep 11, 2010
Score: 0 Reference
I changed the name of the script. Hope this doesn't throw anyone off.

Make sure to delete "ToodleDo Starred Task Edit" (or whatever the name was...delete the one that has the word "Starred" in it) and enable "ToodleDo Multi-Edit Tasks"
Linden

Posted: Sep 12, 2010
Score: 0 Reference
Ok..figured out the problem. I tried to use the Greasemonkey manage scripts option and your script wasn't there. I then compared it to "ToodleDo Me Too" and noticed you didn't have https: just http (https is only available with pro accounts). Added https and all is well.

BTW, it also has two URLs that your script isn't using.
Linden

Posted: Sep 12, 2010
Score: 0 Reference
Follow up. The pro account allows sub-tasks and these don't have a check box when indented.
papagayo

Posted: Sep 12, 2010
Score: 0 Reference
Can you post the two URLs that aren't covered? I'll throw them in as defaults.

I'm not sure what to do about sub-tasks. I don't have a pro account, and don't anticipate getting one anytime soon. Can you post the source code of a page with subtasks (post to rapidshare, mediafire, dropbox, etc...)? If you can do that, I'll take a look.

BTW, if you change the date of a task, does that automatically change the due-date of the subtasks for that task?


This message was edited Sep 12, 2010.
Linden

Posted: Sep 12, 2010
Score: 0 Reference
URLs:

https://www.toodledo.com/*
http://*.www.toodledo.com/*
https://*.www.toodledo.com/*


BTW, if you change the date of a task, does that automatically change the due-date of the subtasks for that task?


No..subtasks have their own due dates independent from the parent task.
Linden

Posted: Sep 12, 2010
Score: 0 Reference
Usability issue. It took me forever to figure out to use this script because unfortunately, I have many overdue tasks and the menu to change priorities etc. was way at the top of the page. Any chance you could write a pop-up script that lets us chose due date/priorities in place etc? 99% of the time when I use toodledo, that menu isn't on the screen for me.
papagayo

Posted: Sep 12, 2010
Score: 0 Reference
Good idea. I'll probably set a keystroke to trigger a pop-up. Might take a day or two, but I think that's a good feature.
Linden

Posted: Sep 12, 2010
Score: 0 Reference
Posted by papagayo:
Can you post the source code of a page with subtasks (post to rapidshare, mediafire, dropbox, etc...)?


I can do it tomorrow if this isn't against the ToodleDo terms of agreement and if it doesn't reveal the contents of my tasks/subtasks.
papagayo

Posted: Sep 12, 2010
Score: 0 Reference
Posted by Linden:
Any chance you could write a pop-up script that lets us chose due date/priorities in place etc? 99% of the time when I use toodledo, that menu isn't on the screen for me.


There's now an option to either keep the links in a static location (top of the screen) or in a "pop-up" at the bottom of the screen.

Clicking in the popup will make it disappear.

Pressing 'e' will toggle the popup.
Linden

Posted: Sep 12, 2010
Score: 0 Reference
BTW, you can try out the Pro version for free for a week. None of your data will be lost. Do you need to remember to make any sub-tasks normal tasks should you decide not to purchase it though.
Linden

Posted: Sep 12, 2010
Score: 0 Reference
Posted by papagayo:


There's now an option to either keep the links in a static location (top of the screen) or in a "pop-up" at the bottom of the screen.


Nice! Much more useful now.
You cannot reply yet

U Back to topic home

R Post a reply

Skip to Page:  1   2   3      Next

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