I use Quick Add a lot to create projects for my travels. Each travel is unique, but still has the the same tasks every time: Create a travel request, order tickets, order hotel, create a travel claim etc. Some of these are Next actions (such as Create travel request), while others are future actions (such as Create travel claim). I like to make ticklers of future actioins, just to make sure that I am reminded of them when its time to to handle them (I don't know if this is OK according to GTD, but it works for me). The problem has been that suing Quick Add, everying but the project text became actions, so I had to go in and modify them to ticklers every time. I therefore tried to modify the Quick Add code to add ticklers as well. I turned out to be doable with very few changes.
Here is how it works, given the following input to Quick Add: Travel to NYC 16-20 Nov 2009 .Create travel request for travel to NYC 16-20 Nov 2009|N|Office .Create travel claim for travel to NYC 16-20 Nov 2009|20091123|Office This creates a project for a business trip with one Next action (the travel request) and one tickler (the travel claim) which kicks in the first Monday back at work after the travel (23 Nov). The code for this is given below, pardon the clumsy style, I'm no Javascript programmer. I suggest this an enhancement to the Quick Add functionality - what do you think? - Erlend The code is added to tiddler MgtdProcessInbox (see right hand column, tab More..., subtab TW, subtab All, find it in the list, open and edit it). It is basically the new block of code marked below instead of the single fields.push("Action"); line and then a modification to last line of the saveTiddler() call to add the date for tiddlers. if (document.getElementById('piShowActions').checked) displayThese.push(title); //------------ begin code for tickler in Quick Add ------------- var ticklerdate=""; var tmpfields=new Array(); for (var ii=0;ii<fields.length;ii++) if(fields[ii].substr(0,2) == '20') //this fails after 31 Dec 2099... ticklerdate=fields[ii]; else tmpfields.push(fields[ii]); if(ticklerdate){ fields=tmpfields; //remove ticklerdate from fields fields.push("Tickler","Once"); // make it a one shot tickler } else fields.push("Action"); // make it an action //------------ end code for tickler in Quick Add ------------- if (currentProject.trim() != "") fields.push(currentProject); // make it in this project // these should be configurable var automagicContexts = { 'Call':'call', 'Errand':'buy' }; for (amc in automagicContexts) { var checkExists = store.fetchTiddler(amc); var startString = automagicContexts[amc]; if (title.substr(0,startString.length).toLowerCase() == startString && checkExists && checkExists.hasTag('Context')) { fields.push(amc); } } if (store.tiddlerExists(title)) alert("Warning: '"+title+" already exists, did not create"); else store.saveTiddler( title,title, tiddlerText ? tiddlerText : "", // content config.options.txtUserName, new Date(), fields, // tags ticklerdate ? {'mgtd_date':ticklerdate} : null // tickler's date, if set <<== Tickler in Quick Add ); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "GTD TiddlyWiki" group. To post to this group, send email to gtd-tiddlywiki@googlegroups.com To unsubscribe from this group, send email to gtd-tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/gtd-tiddlywiki?hl=en -~----------~----~----~----~------~----~------~--~---