Fix caldav subtask move bug

If modified date was 0 the subtask was deleted
pull/1032/head 9.7.1
Alex Baker 6 years ago
parent e641d71e35
commit 15c1266bea

@ -1,9 +1,10 @@
Change Log Change Log
--- ---
======= =======
### 9.7.1 (2020-06-18) ### 9.7.1 (2020-06-19)
* Fix crash on backup import * Fix crash on backup import
* Fix CalDAV/EteSync subtask move bug
### 9.7 (2020-06-12) ### 9.7 (2020-06-12)

@ -43,7 +43,7 @@ android {
defaultConfig { defaultConfig {
testApplicationId = "org.tasks.test" testApplicationId = "org.tasks.test"
applicationId = "org.tasks" applicationId = "org.tasks"
versionCode = 90701 versionCode = 90702
versionName = "9.7.1" versionName = "9.7.1"
targetSdkVersion(Versions.targetSdk) targetSdkVersion(Versions.targetSdk)
minSdkVersion(Versions.minSdk) minSdkVersion(Versions.minSdk)

@ -84,10 +84,12 @@ abstract class TaskDao(private val database: Database) {
+ "ORDER BY CASE WHEN gt_parent = 0 THEN 0 ELSE 1 END, gt_order ASC") + "ORDER BY CASE WHEN gt_parent = 0 THEN 0 ELSE 1 END, gt_order ASC")
abstract fun getGoogleTasksToPush(account: String): List<Task> abstract fun getGoogleTasksToPush(account: String): List<Task>
@Query("SELECT tasks.* FROM tasks " @Query("""
+ "LEFT JOIN caldav_tasks ON tasks._id = caldav_tasks.cd_task " SELECT tasks.*
+ "WHERE caldav_tasks.cd_calendar = :calendar " FROM tasks
+ "AND tasks.modified > caldav_tasks.cd_last_sync") INNER JOIN caldav_tasks ON tasks._id = caldav_tasks.cd_task
WHERE caldav_tasks.cd_calendar = :calendar
AND (tasks.modified > caldav_tasks.cd_last_sync OR caldav_tasks.cd_last_sync = 0)""")
abstract fun getCaldavTasksToPush(calendar: String): List<Task> abstract fun getCaldavTasksToPush(calendar: String): List<Task>
@Query("SELECT * FROM TASKS " @Query("SELECT * FROM TASKS "

@ -4,6 +4,7 @@
<item>Added \'☰ > Manage lists\'\n\t- Drag and drop to rearrange the drawer\n\t- Tap to edit or delete a list</item> <item>Added \'☰ > Manage lists\'\n\t- Drag and drop to rearrange the drawer\n\t- Tap to edit or delete a list</item>
<item>Display 2 additional snooze options - @rangzen</item> <item>Display 2 additional snooze options - @rangzen</item>
<item>Fix crash on backup import</item> <item>Fix crash on backup import</item>
<item>Fix CalDAV/EteSync subtask move bug</item>
<item>Update translations</item> <item>Update translations</item>
</string-array> </string-array>
</resources> </resources>

@ -0,0 +1,2 @@
* Fix crash on backup import
* Fix CalDAV/EteSync subtask move bug
Loading…
Cancel
Save