Thanks for your help. I just patched the script according to your suggestion and will monitor for problems. FWIW, with the previous change (!UID), everything appeared to work fine. I had one single occurrence of a conflict where KOrganizer showed me two events with two different UIDs (nicely showed me a diff of the two versions and let me choose to keep one).