Over christmas, I was digging deeper into the recurring issues, and I was looking for less invasive way to make recurring tasks work. Manfred said, my prior way to generate recurrence information only on unfinished tasks is definitely the wrong way.
Here is the more or less better fix, adressing exactly three problems, where one completely breaks recurring tasks in Kopanos official release 2.4.5:
root@netprobe:/usr/share/z-push/backend/kopano# diff mapiprovider.php mapiprovider.php-pbfix-v3
1730c1730,1734
< $props[$taskprops["icon"]] = 1281;
---
> if (!($task->complete)) { // PB: fix icon usage:
> $props[$taskprops["icon"]] = 1281; // PB: recurring-icon only for unfinished tasks
> } else { // PB: fix checkmark:
> $props[$taskprops["complete"]] = true; // PB: without this, completed recurring tasks are not checkmarked
> } // PB: unfixed: due-date is wrong for completed recurring tasks
1743a1748,1750
> if (!(isset($recur["start"]))) { // PB: start (required) undefined with Nine on Android
> $recur["start"] = $task->duedate ; // PB: define it, as it's required
> } // PB: dunno, who's fault it is
The code first fixes an issue with the icon: it should be the recurring-icon only for unfinished tasks. For those marked as done, the normal to-do icon is standard.
Next, the finished recurring task has the done-checkbox unchecked. My code fixes this, certainly at the wrong place, but it fits here well.
Finally, for reasons I could’nt find, $recur[“start”] is undefined if the task is not created without a future start date, so I fix this too. This removes the error message and fixes the outlook crashes when a task created in OL is marked as done on Nine, and the new instance created by Nine is marked as done in OL.
The fixed mapiprovider.php can be downloaded at https://www.dropbox.com/s/36oq73o61nat7no/mapiprovider.php?dl=0, the old link has been disabled.
This fix clearly does not address all problems with recurring tasks, such as
when a recurring task is completed, it’s due-date is set to the next occurence of the upcoming task (I suspect this relates to the requirement to set $props[$taskprops[“complete”]] = true)
start date end end dates do not reliably work for me and need further testing
As always, use my fix at your own risk! I can not be made liable for any problem you might get with it, including silent data corruption or data loss.