From 26514e9c4cb909b2667a7332b37dea200b941ad7 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 27 Nov 2015 16:12:42 +0000 Subject: [PATCH] Make context menu status / complete match up with what edit dialog does --- infolog/inc/class.infolog_ui.inc.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 2d34d8320b..1d1c4f22e4 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -1414,6 +1414,10 @@ class infolog_ui { $entry['info_status'] = 'ongoing'; } + if($entry['info_percent'] == 0) + { + $entry['info_status'] = 'not-started'; + } if($this->bo->write($entry, true,true,true,$skip_notifications)) { $success++; @@ -1436,7 +1440,11 @@ class infolog_ui if(!in_array($settings,array('done','billed','cancelled','archive')) && $entry['info_percent'] == 100) { // Done entries will get changed right back if we don't change the completion too - $entry['info_percent'] = 90; + $entry['info_percent'] = 10; + } + if(in_array($settings, array('not-started')) && $entry['info_percent'] > 0) + { + $entry['info_percent'] = 0; } $entry['info_status'] = $settings; if($this->bo->write($entry, true,true,true,$skip_notifications))