NC Tasks flattens subtasks after they have been moved beteween calendars by Tasks.org
Steps to reproduce
- Have a task with subtask
- Use Tasks.org to move it to a different calendar and note the modification timestamp
- Cause a manual sync in Tasks.org and see that it's still a subtask; unmodified (modified timestamp unchanged)
- Wait a minute and open/refresh NC Tasks
Expected behavior
NC tasks should not touch the subtask structure.
In fact, it should not touch any task data whatsoever unless the user explicitly asked for the specific modification to be done and merely refreshing the page should not imply any modification to be done.
Actual behaviour
The task has been modified after the NC Tasks refresh and the subtask is now at the top-level.
If you then sync Tasks.org again, it too has the subtask at the top level now, so it's not a data representation issue; NC tasks actually modified the task (modification timestamp changed) and that caused it to no longer be a subtask.
Tasks app version
0.16.1
CalDAV-clients used
DAVx5
Browser
No response
Client operating system
No response
Server operating system
No response
Web server
None
Database engine version
None
PHP engine version
None
Nextcloud version
31
Updated from an older installed version or fresh install
None
List of activated apps
Nextcloud configuration
Web server error log
Log file
Browser log
Additional info
No response
I doubt that Tasks touches the data just by opening the Tasks app. Please provide server and browser logs to see what happens.
Server does not log anything and the browser does not log anything interesting:
Notifications permissions denied NotificationsApp.vue:423:1
Polling interval updated to 30000 NotificationsApp.vue:380:1
Started background fetcher as session_keepalive is enabled NotificationsApp.vue:251:1
Got notification data, restoring default polling interval. NotificationsApp.vue:336:1
Duplicate task overridden
Proxy { <target>: {…}, <handler>: {…} }
Object { jCal: (3) […], calendar: Proxy, vCalendar: {…}, subTasks: {}, conflict: false, vtodo: {…}, _uid: "43d26291-9b95-4ea4-9fda-18f8b65c13cd", _summary: "redacted", _priority: 0, _complete: 0, … }
store-BBMiux8F.chunk.mjs:4357:12083
Failed to connect with service worker for getRuleList msg undefined content.js:1:34437
Duplicate task overridden
Proxy { <target>: {…}, <handler>: {…} }
Object { jCal: (3) […], calendar: Proxy, vCalendar: {…}, subTasks: {}, conflict: false, vtodo: {…}, _uid: "12db1e36-b793-4105-b226-9e3bc2122d49", _summary: "redacted", _priority: 0, _complete: 0, … }
store-BBMiux8F.chunk.mjs:4357:12083
Duplicate task overridden
Proxy { <target>: {…}, <handler>: {…} }
Object { jCal: (3) […], calendar: Proxy, vCalendar: {…}, subTasks: {}, conflict: false, vtodo: {…}, _uid: "975cbd6e-c01e-46df-873b-a7ad2879720f", _summary: "redacted", _priority: 1, _complete: 0, … }
store-BBMiux8F.chunk.mjs:4357:12083
(These tasks are unrelated.)
Are you able to reproduce this issue? This happens every time for me; it should be trivial to trigger.
Reproducable on my end. Tasks.org 14.8 NC Tasks 0.16.1 DAVx5 4.5.4-ose
I am not able to reproduce this, since I don't use Tasks.org. But if you don't see any request by the Tasks app to the server, then it's not the Tasks app. Tasks is a pure client side app. It does not have a server side that alters tasks. Any change to your tasks coming from the Tasks app is visible through a request in your browser.
My latest test shows that Nextcloud tasks still sees the subtasks properly after a move, but Tasks.org doesn't. Are you seeing that too, @Atemu ?
My Analysis
I think this is the bug of coordination between Tasks.org and NC Tasks.
Tasks.org deletes main and sub tasks before creating them. Although the creation order is correctly in reverse, the relation cannot be recovered. The creation of two tasks are almost simultaneously, so this race condition may cause NC Tasks to fail to construct the relation.
I cannot get raw transactions from server's debug level logging, so cannot figure out who is responsible for the relation construction failure.
Possible Solutions
- Tasks.org ensures the existence of the main task before creating its subtask.
- NC Tasks postpones task creation (saying 3 seconds) if it relates to an unknown task.
- NC Tasks processes task operations in the same calendar in sequence (or ensures no race condition).
Steps to Reproduce the Bug
- In Tasks.org, create a task "Main" with subtask "Sub" in the "Church" calendar. Wait until DAVx5 finishes synchronization. (By default it triggers synchronization upon any task change, so no need to trigger it manually.) Export the "Church" calendar.
- In Tasks.org, move the task "Main" to the "Personal" calendar. Wait for DAVx5. Observe "Main" and "Sub" are not tiered in both Tasks.org and NC Tasks. Export "Personal" calendar.
- In NC Tasks's web UI, let "Sub" to be the subtask of "Main" by dragging "Sub". Wait for the update progress. Export "Personal" calendar.
- In NC Tasks's web UI, move "Main" to the "Church" calendar. Wait for update. Export the "Church" calendar.
Server Logs
# step 1
172.20.0.2 - ray [12/Dec/2025:18:58:09 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 2463 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:09 +0800] "PUT /remote.php/dav/calendars/ray/church/4453684611866508736.ics HTTP/1.1" 201 569 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:09 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 1434 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:09 +0800] "REPORT /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 14745 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:10 +0800] "REPORT /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 1665 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:10 +0800] "PROPFIND /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 1491 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:12 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 2447 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:12 +0800] "PROPFIND /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 1491 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:21 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 2447 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:21 +0800] "PROPFIND /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 1491 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:26 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 2447 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:26 +0800] "PUT /remote.php/dav/calendars/ray/church/225135461066301601.ics HTTP/1.1" 201 569 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:26 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 1434 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:26 +0800] "REPORT /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 14991 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:27 +0800] "REPORT /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 1679 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:27 +0800] "PROPFIND /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 1491 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:28 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 2451 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:28 +0800] "PROPFIND /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 1491 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - - [12/Dec/2025:18:58:32 +0800] "REPORT /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 22024 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
172.20.0.2 - - [12/Dec/2025:18:58:32 +0800] "REPORT /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 20139 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
172.20.0.2 - - [12/Dec/2025:18:58:38 +0800] "GET /remote.php/dav/calendars/ray/church?export HTTP/1.1" 200 674654 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
# step 2
172.20.0.2 - ray [12/Dec/2025:18:58:55 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 2453 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:55 +0800] "DELETE /remote.php/dav/calendars/ray/church/4453684611866508736.ics HTTP/1.1" 204 426 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:55 +0800] "DELETE /remote.php/dav/calendars/ray/church/225135461066301601.ics HTTP/1.1" 204 426 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:56 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 1434 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:56 +0800] "REPORT /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 14498 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:56 +0800] "PROPFIND /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 1491 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:56 +0800] "PUT /remote.php/dav/calendars/ray/personal/225135461066301601.ics HTTP/1.1" 201 569 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:56 +0800] "PUT /remote.php/dav/calendars/ray/personal/4453684611866508736.ics HTTP/1.1" 201 569 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:57 +0800] "PROPFIND /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 1436 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:57 +0800] "REPORT /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 41967 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:58 +0800] "REPORT /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 2532 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:59 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 2449 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:58:59 +0800] "PROPFIND /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 1491 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:59:00 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 2453 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:59:00 +0800] "PROPFIND /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 1491 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - - [12/Dec/2025:18:59:06 +0800] "REPORT /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 22923 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
172.20.0.2 - - [12/Dec/2025:18:59:06 +0800] "REPORT /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 19198 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
172.20.0.2 - ray [12/Dec/2025:18:59:06 +0800] "PROPFIND /remote.php/dav/calendars/ray/church/ HTTP/1.1" 207 2445 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - ray [12/Dec/2025:18:59:07 +0800] "PROPFIND /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 1491 "-" "DAVx5/4.5.7.1-ose (dav4jvm; okhttp/5.3.2) Android/16"
172.20.0.2 - - [12/Dec/2025:18:59:11 +0800] "GET /remote.php/dav/calendars/ray/personal?export HTTP/1.1" 200 779323 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
# step 3
172.20.0.2 - - [12/Dec/2025:18:59:32 +0800] "PUT /remote.php/dav/calendars/ray/personal/225135461066301601.ics HTTP/1.1" 204 513 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
172.20.0.2 - - [12/Dec/2025:18:59:46 +0800] "GET /remote.php/dav/calendars/ray/personal?export HTTP/1.1" 200 779355 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
# step 4
172.20.0.2 - - [12/Dec/2025:18:59:57 +0800] "REPORT /remote.php/dav/calendars/ray/personal/ HTTP/1.1" 207 754 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
172.20.0.2 - - [12/Dec/2025:18:59:58 +0800] "MOVE /remote.php/dav/calendars/ray/personal/225135461066301601.ics HTTP/1.1" 201 482 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
172.20.0.2 - - [12/Dec/2025:18:59:59 +0800] "MOVE /remote.php/dav/calendars/ray/personal/4453684611866508736.ics HTTP/1.1" 201 482 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
172.20.0.2 - - [12/Dec/2025:19:00:11 +0800] "GET /remote.php/dav/calendars/ray/church?export HTTP/1.1" 200 674639 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
Calendar Exports
Step 1: Church
BEGIN:VTODO
DTSTAMP:20251212T105811Z
UID:4453684611866508736
CREATED:20251212T105810Z
LAST-MODIFIED:20251212T105810Z
SUMMARY:Main
PRIORITY:9
STATUS:NEEDS-ACTION
X-APPLE-SORT-ORDER:734713461
DUE;VALUE=DATE:20251213
BEGIN:VALARM
TRIGGER;RELATED=END:PT0S
ACTION:DISPLAY
DESCRIPTION:Default Tasks.org description
END:VALARM
END:VTODO
BEGIN:VTODO
DTSTAMP:20251212T105827Z
UID:225135461066301601
CREATED:20251212T105827Z
LAST-MODIFIED:20251212T105827Z
SUMMARY:Sub
PRIORITY:9
STATUS:NEEDS-ACTION
RELATED-TO;RELTYPE=PARENT:4453684611866508736
DUE;VALUE=DATE:20251213
BEGIN:VALARM
TRIGGER;RELATED=END:PT0S
ACTION:DISPLAY
DESCRIPTION:Default Tasks.org description
END:VALARM
END:VTODO
Note: RELATED-TO;RELTYPE=PARENT:4453684611866508736 is in "Main".
Step 2: Personal
BEGIN:VTODO
DTSTAMP:20251212T105858Z
UID:225135461066301601
CREATED:20251212T105856Z
LAST-MODIFIED:20251212T105856Z
SUMMARY:Sub
PRIORITY:9
STATUS:NEEDS-ACTION
DUE;VALUE=DATE:20251213
BEGIN:VALARM
TRIGGER;RELATED=END:PT0S
ACTION:DISPLAY
DESCRIPTION:Default Tasks.org description
END:VALARM
END:VTODO
BEGIN:VTODO
DTSTAMP:20251212T105858Z
UID:4453684611866508736
CREATED:20251212T105856Z
LAST-MODIFIED:20251212T105856Z
SUMMARY:Main
PRIORITY:9
STATUS:NEEDS-ACTION
X-APPLE-SORT-ORDER:734713461
DUE;VALUE=DATE:20251213
BEGIN:VALARM
TRIGGER;RELATED=END:PT0S
ACTION:DISPLAY
DESCRIPTION:Default Tasks.org description
END:VALARM
END:VTODO
Note: RELATED-TO is missing in "Main".
Step 3: Personal
BEGIN:VTODO
DTSTAMP:20251212T105932Z
UID:225135461066301601
CREATED:20251212T105856Z
LAST-MODIFIED:20251212T105932Z
SUMMARY:Sub
PRIORITY:9
STATUS:NEEDS-ACTION
DUE;VALUE=DATE:20251213
RELATED-TO:4453684611866508736
BEGIN:VALARM
TRIGGER;RELATED=END:PT0S
ACTION:DISPLAY
DESCRIPTION:Default Tasks.org description
END:VALARM
END:VTODO
BEGIN:VTODO
DTSTAMP:20251212T105858Z
UID:4453684611866508736
CREATED:20251212T105856Z
LAST-MODIFIED:20251212T105856Z
SUMMARY:Main
PRIORITY:9
STATUS:NEEDS-ACTION
X-APPLE-SORT-ORDER:734713461
DUE;VALUE=DATE:20251213
BEGIN:VALARM
TRIGGER;RELATED=END:PT0S
ACTION:DISPLAY
DESCRIPTION:Default Tasks.org description
END:VALARM
END:VTODO
Note: RELATED-TO:4453684611866508736 is in "Main".
Step 4: Church
Identical to step 3. Yes, the two LAST-MODIFIED fields are even untouched.
Environment
- Docker compose Nextcloud server setup behind Nginx (version 1.29.0) reverse proxy behind Cloudflare proxy.
- Nextcloud server: 32.0.2-apache.
- Nextcloud tasks: 0.17.1.
- DAVx5: 4.5.7.1-ose from F-Droid.
- Tasks.org: 14.8.3 from F-Droid.