Hey all,

I believe there was a thread that described a problem where any changes to kGTD tasks done on a Palm, and than subsequently synced to iCal would get overwritten by the next kGTD sync.

The reason for this probm was that The Missing Sync, as it synced changes from Palm (using iSync) would fail to update the ‘last modifie’ timestamp, and kGTD would not be aware of the changes, and overwrite them.

I have a script that works around this problem, and wanted to post it to that thread, but can’t seam to find it. If you know which one it is, please let me know.

Thanks, Marcin


louis's picture

http://kinkless.com/node/694

http://kinkless.com/node/694


marcink's picture

Thanks, Per MEP’s

Thanks, Per MEP’s suggestion I’ll be posting a link there to this thread. Marcin


MEP's picture

You could just post it to

You could just post it to this thread too. Really, you’ve gotten the attention of the Missing Sync users in the house who have been waiting for any kind of fix for some time now. You’ve piqued my interest, that’s for sure.


MEP's picture

Also, has anyone told

Also, has anyone told MarkSpace? This is technically their bug and I’d like them to fix it.


marcink's picture

Yes, MarkSpace is aware. I

Yes, MarkSpace is aware.

I had an exchange with their engineers and the problem apparently lies with Apple’s iSync services and not MarkSpace’s code, although I have not doen the digging to confirm this.

I’ll post a longer message below with an explanation.

Marcin


kaderan's picture

Hi Guys, I’m looking for a

Hi Guys, I’m looking for a GTD system, and based on the positive vibes I’m getting on the web regarding kGTD I’ve just downloaded a trial of OOP and install kGTD. I was just about ready to take it for a spin when I encountered these posts on the bugginess related to synching with iCal. Seamless roundtripping to my Palm is a requirement for me, so if this is broken, I’m afraid I won’t go further with kGTD for the moment. Just so I’m clear:

I am using 10.4.7 MissingSync 5.1

If I understand correctly from posts on this forum, this configuration is broken for roundtrip editing in kGTD at the moment, is that right? I’m really busy at the moment, and I don’t have the time to invest in the learning curve for a new GTD system if there’s a gotcha in the sync area…


MEP's picture

There is a gotcha. Tasks

There is a gotcha. Tasks marked as complete on the Palm don’t sync as completed to kGTD because the MarkSpace developers didn’t program Missing Sync to update the “last modified” attribute of tasks and events when they get synced back to the desktop. Marcink has posted that he has a script that “works around” this problem but we haven’t seen that script yet, so we really don’t know any more than that.

It should be theoretically possible for kGTD to compare the content of tasks when syncing between kGTD and iCal and be able to then determine if something has been changed since the last sync (but this is not exactly ideal since problems could arise from this approach). Frankly, it’s MarkSpace’s bug and it’s amazing that Missing Sync 5 still has holes like this one after having been out for so long, it seems so obvious.

But, you’re right that this bug essentially breaks the sync between kGTD and a Palm device. I still use kGTD because it’s far and away better than trying to organize the same information with traditional todo list apps. Even if I can’t get the data on my Palm right now, it’s better than doing all the grunt work myself. It would be nice though if somone had a solution.


Joerg's picture

Hi, this combination works

Hi,

this combination works pretty well. I am also using kGTD, i Cal and MissingSync for my PDA running Windows Mobile 5. As far as I am concerned there is now problem. But be aware that you do not mix up the synchronizations. So do not make similar changes on your PDA and kGTD then everything will be alright.


kaderan's picture

Thanks all for the

Thanks all for the information. I’ve dropped a note regarding the issue on the MarkSpace site, don’t know if anything will come of it. I will spend some time with kGTD and see how it works out for me. Perhaps I will just not do any editing on the palm, which sort of begs the point of having a pda, but there it is. Cheers!


hperryman's picture

Marcin, you’re saying you

Marcin, you’re saying you have a fix for this behavior? I think there are a lot of us who would very much like to get hold of that. Do you have a website or FTP you could post it to? I can’t see a way to actually attach files to the thread, maybe someone else knows if that can be done.

Thanks,

Heath


marcink's picture

Indeed, I have a script that

Indeed, I have a script that I have been using for a few weeks now and seams to do the job for me. I want to do a minor cleanup on it before I post it, though.

Below is a bit of an explanation of what is broken under the hood, and what the work-around is.

First, two quick questions:

  1. What would be the best place to post the script files (for speed there is more than one)?

  2. (somewhat unrelated) How do I get this site to e-mail me replies to my posts?

The Problem

As MEP has already mentioned above, and was also mentioned in a previous post on the topic (thanks louis for the pointer), the main problem is that when a task is modified on Palm, and than subsequently synced to iCal using MarkSpace’s Missing Sync for Palm (Mark/Space Tasks conduit), the update to the content of the task is correctly passed onto iCal, but the “last modified” attribute (internally called ‘stamp_date’ field) remains unchanged.

After such update, when you run ‘Sync’ from kGTD it seams to look at this ‘stamp_field’ to determine if a task in iCal was modified, and of course it finds it unchanged, thus it assumes nothing was changed. In addition, it appears that kGTD defaults to overwriting iCal tasks at the end of its Sync operation, regardless of whether this step is required. This way all Palm based changes get lost.

Who Is At Fault

I contacted MarkSpace about the problem, and the support representative was kind enough to get me in touch with the engineers working on the product. They apparently investigated the issue and found that the problem lies in the way Apple’s iSync service updates iCal content.

At this time I have no way to verify whether this is true, but I do think it is possible. The way MarkSpace Tasks conduit works as of I believe version 5 of Missing Sync, is it does not interact with iCal directly. Instead, it utilizes Apple’s new iSync services, which take care of synchronizing changes between datasets. This does not mean that they have done everything they can to address the issue, but this is indeed possible, even likely.

The Work Around

The work-around consists of two stages:

  1. At the end of every kGTD Sync, my script saves a copy of all tasks in iCal

  2. At the start of every kGTD Sync, it compares the saved copy against what is found in iCal, and whenever it finds changes to task content, but the stamp_date field unchanged, it assigns a new time stamp.

Because I have managed to link it into kGTD’s Sync script so that it is called automatically at the beginning and end of a kGTD Sync, the operation is relatively transparent, but it does require a small (two line) tweak to the kGTD Sync.scpt script.

Requirements

The script is written in python, and requires: - Python 2.3.5 or later (although so far I only tested it with 2.3.5 on Intel Mac) - latest appscrip module (there were recent changes in how appscript runs), version 0.16.2 or later. For appscript 0.16.2 you can find Appscript-Installer-1.4.1.dmg here - it contains packages for Python 2.3, 2.4 and 2.5, both PPC and Intel.

The script also supports Growl. It will display status notification for every execution. You will need: - Growl installed on your system - Python Growl module. To get it, install Growl SDK from this page, and python bindings can be found in SDK/Bindings/python.

…….

I guess you can call this a teaser. As soon as I finish the final cleanup of the script and have a way to post them without just pasting the script right here, I’ll put the script up.

Cheers, Marcin


wari's picture

The

The way MarkSpace Tasks conduit works as of I believe version 5 of Missing Sync, is it does not interact with iCal directly. Instead, it utilizes Apple’s new iSync services, which take care of synchronizing changes between datasets.

It looks like it is iSync’s fault. It does not matter how Mark/Space does it. I just tried syncronizing my phone using isync. The task gets marked in iCal, but KGTD does not recognize it at all. Another way is to probably get KGTD to look into iCal everytime sync is activated.

If syncing between devices don’t work well, then there’s no point in syncing. The only problem is, I have my phone or my palm around with me all the time, not the computer.


monkbent's picture

I just took the time to

I just took the time to register for the sole purpose of thanking you in advance. Can’t wait to see the script!


nick's picture

Applescript workaround for

Applescript workaround for Palms and Missing Sync

While we wait for Marcin’s Python-based solution, I thought I’d offer a very quick and dirty Applescript-based one, that nevertheless works very well for me in 11 lines of code.

First, a warning. The following script works perfectly fine for me, but please, please backup your Kinkless scripts, OmniOutliner documents and iCal information before you use it. I take no responsibilty for any damage done or information lost!

That said, here we go:

Installing the Applescript Palm Sync hack

1) Browse to /YourHomeDIrectory/Library/Scripts/Applications/OmniOutliner Pro/Kinkless

2) Take a moment to backup the sync script by copying it to a different location

3) Ctrl-Click the “Sync” file and select open with -> script editor

4) Paste the following code into the top of the document, before any comments:

tell application "iCal"
    repeat with allCals in calendars
        repeat with the_todo in todos of allCals
            if exists completion date of the_todo then
                set new_todo to properties of the_todo
                delete completion date of the_todo
                set completion date of the_todo to (completion date of new_todo)
            end if
        end repeat
    end repeat
end tell

5) Save and close the file.

6) Restart OmniOutliner Pro, sync up your Palm using Missing Sync, and hit the Sync button in your GTD document. You should find all todo items marked as done on your Palm are reflected in KGTD.

Why it works

I read a comment by stormy in this post http://kinkless.com/node/694 that said by checking and unchecking the todo in iCal, KGTD was prompted to pick up the change on the next sync. My ugly applescript simply does this automatically so you don’t have to, forcing the stamp date to update and allowing KGTD to see the changes when it syncs.

Other things to note

1) This is still in testing stages. Please let me know if it works for you by posting here.

2) The script doesn’t honour the “Use iCal synchronization” setting under KGTD settings. If you later decide you want to set this to “false” to stop iCal syncing, you should probably delete the Applescript you’ve added to the Sync file.

3) Only the checkbox of each todo is updated in KGTD when you sync your Palm. This means that if you alter the due date or add any notes to the todo on your Palm, they won’t get carried across to KGTD. Changing the due date or notes on your Mac and then syncing will still transfer to the Palm ok, but it doesn’t work the other way around — only the checkbox status works both ways with this hack at the moment.


keenannick's picture

Oh my god do I love you.

Oh my god do I love you. Works like a charm with completed tasks, at least so far. I haven’t looked at the forum in a month and this shows up yesterday. Amazing. Obviously doesn’t address the syncing of any changes to existing to dos… But it seems like this is half way there to a solution for that as well. Does anyone know of a similar property for last modified date in iCal and if there is a way to compare the last kGTD sync timestamp with the iCal last modified date in the repeat loop, or would that foul up kGTD sync?


nick's picture

Glad it works for you too.

Glad it works for you too. There is a quick and dirty way I could adapt it to update the existing todos with changes by updating the datestamp on every single todo, without bothering to check whether it’s changed.

The following script should datestamp all your todos, forcing KGTD to update every single one. I imagine this may result in a performance hit, depending on how many todos and notes you have but I’ve not tested this, so again: back everything up before you try it!

EDIT: After experimenting, this could cause potential problems - iCal information will always overide edits you’ve made in KGTD, which is no good. I’ve temporarily removed the Applescript I had posted here to avoid any nightmares.

Possible solution?

The iCal Applescript dictionary shows that each todo has a property called “sequence,” which stores the version of the todo. Each time the todo is updated, this version number increases. As far as I can see, Missing Sync/iSync correctly updates this version number when changes are made, even though it fails to date stamp it. My thinking at present is that by altering the KGTD sync script to use the version number variable to determine which is the latest version, rather than using the date stamp might work in our favour. Will have to save that for another day — I’m off to bed!


monkbent's picture

Thanks a lot NIck - works

Thanks a lot NIck - works great here.


hperryman's picture

Works for me too. Thanks so

Works for me too. Thanks so much for doing this, it’s a fantastic improvement!!!


nick's picture

Glad it’s working for you

Glad it’s working for you folks too. I’m working on getting the full sync procedure up and running for our Palms and have been doing some digging. Here’s what I’ve found:

By downloading a beta app called “Syncrospector” from the Apple Developer Connection site, which allows you to examine Apple’s Sync Service Database before and after each sync, I’ve established that there’s a big discrepency in the way that iCal updates ToDo properties, and the way that Missing Sync does.

The key difference is this: when you update a todo in iCal, or sync one updated in KGTD back to iCal, it increases the ToDo’s “sequence” property by 1. This serves as the version number of the todo. When you do the same in Missing Sync, this sequence number remains unchanged. My theory is that this is a mistake, and it might be what’s preventing the datestamp from updating. The datestamp is actually a read-only property that the system creates, so my hunch is it’s triggered by the updating of the version number, which must be done manually. Of course, I could be off the mark on this one.

I’ll get in touch with MarkSpace to run the theory by them as soon as their site’s back up, and let you guys know what they say.


Paul's picture

Once again, nice work Nick.

Once again, nice work Nick.


bdr's picture

thanks for your great

thanks for your great detective work on this. It’s the only thing thats bugging me about kgtd.

Brett


nick's picture

Applescript workaround

Applescript workaround Version 2 for Palms and Missing Sync

MarkSpace haven’t gotten back to me yet, so in the meantime, here’s an update to my first workaround. V2 allows you to also change the due dates, notes etc of Todos on your Palm, (as well as the completion status from the V1 script) and have all this synced up with KGTD. It requires just a tiny bit of work on your part.

Same warning applies — back all your data up first. This stuff is experimental right now!

The new script

Browse to and save the new sync script from here. Then follow the instructions as before to add this to the KGTD sync script, being sure to replace the original version.

How to use it

The script works the same as before. If you add, delete, or check off an event on your Palm, you simply hotsync it and press sync in KGTD to sync everything up.

The new addition is this: if you change anything else in the event on your Palm, like the due date or adding a note etc, you need to add 3 asterisks to the note of the Todo. The asterisks can appear anywhere in the note — the script just looks for these as a sign that it’s been updated on the Palm. This sounds like a pain in the arse, but it soon becomes second nature, and it’s pretty rare to change a due date or add notes to Todos anyway. Once you sync in KGTD, you’ll then be ask to hotsync again to remove the triple asterisk tag on the Palm. You can remove them manually from your Palm events if you like, but you must do one or the other. .

Why I’ve done it this way

Unfortunately, Missing Sync/iSync neither datestamps nor increases the version number of Todos when they’re updated on the Palm. This renders the changes completely invisible to KGTD and other third-party Applescripted apps. The two options are:

1) Create our own flat file db or “truth database” of synced events, and check them before and after syncing in KGTD. This is essentially the method proposed by Marcin above. It’s great, but requires a lot of work and effort on the part of the programmer, and we’re duplicating information that already exists in Apple’s Sync Database. We can’t access this database directly via Applescript (only via a Cocoa API), so our only other option is to:

2) Quickly tag events whose notes or due dates we update on the Palm ourselves. This is how I came up with the triple asterisk system, and it’s been working well for me for a couple of days now. Note you can happily edit the tag you use from triple asterisks to something else by editing the “set tagString to…” line in my Applescript.

Hope that helps some folks and makes sense. Questions or comments welcome as always.


monkbent's picture

Nice work Nick. You could


nick's picture

No problem MB. Thanks for

No problem MB. Thanks for the shortcut tip — I’m relatively new to this stuff, so didn’t even know you could do that. Turns out that Treo users have had the shortcut menu removed from the machine, but this free app fixes that.


kaderan's picture

I just realized that Missing

I just realized that Missing Sync 5.1.1 has just been released. Does anyone know if this bug fix upgrade addresses any of our problems?


nick's picture

I don’t think so, sadly

I don’t think so, sadly Kaderan. I’ve been running 5.1.1 since before I wrote the hack, and it still failed to update — I think the problem may well turn out to lie with iSync, not Missing Sync. It could be a while before we see iSync updated — I imagine most of Apple’s resources are focussed on the Leopard launch.


stormy's picture

Don’t hold your breath for

Don’t hold your breath for MarkSpace. Ever since their product hit version 5, their support has tanked - no doubt because the product’s quality tanked too. Now every problem is blamed on Apple and the “truth database”. Switching to version 5 made all of my contacts (1100+), calendars and to-dos reshuffle their categories. It took me days to fix everything. Upgrading from version 5.1 to 5.1.1 did it again for calendars and to-dos, except that this time I’d been using kGTD for a long time and didn’t mind having all my events in one calendar, and kGTD overwrote the ToDos anyway. The additional fields of my Treo 600 got reshuffled too so I lost all my birthdays, etc.

MarkSpace’s response has always been blaming Apple or blaming the Treo 600 and its “older” databases (apparently their app works better with Treo 650).

Anyway, enough of a rant here. Oh well…

Nick - thanks for working on this!


nick's picture

No problem stormy - it was

No problem stormy - it was your innocent suggestion in the other post that sparked the idea. I hope my fix is only a temporary solution, but it seems to work for now.

To confirm your suspicions: I have a Treo 650 and have absolutely no problem at all with Missing Sync 5.1.1 (save for the hiccups that the above Applescript was written to combat). To me, it’s worth the money simply because it categorises my events and todos — something which has always been beyond iSync…


akotzin's picture

Can’t get it working… It

Can’t get it working… It meesed up my DB, which freaked me out enough to quickly delete the script and sync again - all was good ;)

Any uodates on this script?

Thanks nick - highly appreciated work !

kGTD > OS X @palm ?!


marcink's picture

Gents and Gals, I must

Gents and Gals,

I must apologize for not having posted my Python script yet, but I am getting married this Saturday and as you can imagine I have been swamped getting things done for the wedding.

Looks like there have been interesting interim solutions posted, which just shows that there is plenty of us using Kinkless GTD and Palm.

Marcin


bz's picture

Works like a

Works like a charm.

Thanks!

BZ


Dr. J's picture

Just to confirm: Is this *

Thanks!

Dr. J www.bonehead.us


fly888's picture

This is great!!! Thanks so

This is great!!!

Thanks so much!


Jeffrey Morris's picture

I’m no programmer and can

I’m no programmer and can barely understand this stuff. Can ical and Kinkless sync with my Treo 750? Can someone explain how to do this? where to go to learn, who to hire to teach me? Thanks

jmorris


Denis Brennan's picture

Nick, I installed your

Nick,

I installed your later script and all seemed good. Today (and in between I moved address and network), I ran sync which failed with error “AppleScript reported the following error: Invalid date and time date Thursday, March 8, 2007 22:21:34.” I removed your extra lines from script to try it in its basic form, but to no effect. any thoughts?

Denis


Applescript Workaround for Palms and Missing Sync

Sweet! Thanks for the fix…works perfectly, much joy.


Re: Task changes on Palm synced through iCal to kGTD fail (using

Hi! I’m new to this thread. I just got a Treo 680, and I’m eager to make it sync both ways with kGTD. The links to the script and freeware above do not seem to work anymore. I need some help here. What is the updated solution to this issue?

Thank you.


Re: Task changes on Palm synced through iCal to kGTD fail (using

I second that. The link posted above for version 2 of the Script (the one that we really want) is broken. Can someone just post the script code here so that we can take advantage of Nick’s great detective work?

Thanks.


Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use Markdown syntax to format and style the text.
  • Each email address will be obfuscated in a human readble fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.
  • Images can be added to this post.

More information about formatting options

Captcha Image: you will need to recognize the text in it.
Please type in the letters/numbers that are shown in the image above.