(fix) correctly set percent-complete for tasks from the list view (fixes #3197)

This commit is contained in:
Ludovic Marcotte
2016-09-27 13:43:21 -04:00
parent 5ada0024af
commit 84e170a601
2 changed files with 8 additions and 2 deletions

View File

@@ -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];
}