diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Helper/TaskHelper.php | 1 | ||||
-rw-r--r-- | app/Model/TaskModificationModel.php | 2 | ||||
-rw-r--r-- | app/Model/TaskTagModel.php | 1 |
3 files changed, 2 insertions, 2 deletions
diff --git a/app/Helper/TaskHelper.php b/app/Helper/TaskHelper.php index ce39eb2a..84b41e42 100644 --- a/app/Helper/TaskHelper.php +++ b/app/Helper/TaskHelper.php @@ -70,6 +70,7 @@ class TaskHelper extends Base $options = $this->tagModel->getAssignableList($project['id']); $html = $this->helper->form->label(t('Tags'), 'tags[]'); + $html .= '<input type="hidden" name="tags[]" value="">'; $html .= '<select name="tags[]" id="form-tags" class="tag-autocomplete" multiple>'; foreach ($options as $tag) { diff --git a/app/Model/TaskModificationModel.php b/app/Model/TaskModificationModel.php index 1b176a41..be5f53c8 100644 --- a/app/Model/TaskModificationModel.php +++ b/app/Model/TaskModificationModel.php @@ -108,8 +108,6 @@ class TaskModificationModel extends Base if (isset($values['tags'])) { $this->taskTagModel->save($original_task['project_id'], $values['id'], $values['tags']); unset($values['tags']); - } else { - $this->taskTagModel->save($original_task['project_id'], $values['id'], array()); } } } diff --git a/app/Model/TaskTagModel.php b/app/Model/TaskTagModel.php index 91dfd224..2a08e867 100644 --- a/app/Model/TaskTagModel.php +++ b/app/Model/TaskTagModel.php @@ -82,6 +82,7 @@ class TaskTagModel extends Base public function save($project_id, $task_id, array $tags) { $task_tags = $this->getList($task_id); + $tags = array_filter($tags); return $this->associateTags($project_id, $task_id, $task_tags, $tags) && $this->dissociateTags($task_id, $task_tags, $tags); |