From 84e170a601f4c6b4ac8cc96c8a621acfa36d6c56 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 27 Sep 2016 13:43:21 -0400 Subject: [PATCH] (fix) correctly set percent-complete for tasks from the list view (fixes #3197) --- NEWS | 1 + UI/Scheduler/UIxTaskEditor.m | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 7d88586cc..f2a16ca62 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ Enhancements - [eas] propagate message submission errors to EAS clients (#3774) Bug fixes + - [web] correctly set percent-complete for tasks from the list view (#3197) - [core] we now search in all domain sources for Apple Calendar - [core] properly handle groups in Apple Calendar's delegation diff --git a/UI/Scheduler/UIxTaskEditor.m b/UI/Scheduler/UIxTaskEditor.m index c6cc7a18a..800bded6a 100644 --- a/UI/Scheduler/UIxTaskEditor.m +++ b/UI/Scheduler/UIxTaskEditor.m @@ -577,12 +577,17 @@ { newStatus = [self queryParameterForKey: @"status"]; if ([newStatus intValue]) - [todo setCompleted: [NSCalendarDate date]]; + { + // -setCompleted will also set the status to "COMPLETED" + [todo setCompleted: [NSCalendarDate date]]; + [todo setPercentComplete: @"100"]; + + } else { + // -setCompleted will also set the status to "IN-PROCESS" [todo setCompleted: nil]; [todo setPercentComplete: @"0"]; - [todo setStatus: @"IN-PROCESS"]; } [[self clientObject] saveComponent: todo]; }