From 2223072881e7fd00103d6f2add78de38ad2728e2 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 9 Feb 2020 14:52:45 +0100 Subject: [PATCH] Set the end date to the same as the due date if a start date was set but no end date --- src/components/tasks/TaskDetailView.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/tasks/TaskDetailView.vue b/src/components/tasks/TaskDetailView.vue index 7f514b4db..8a5d8fc1d 100644 --- a/src/components/tasks/TaskDetailView.vue +++ b/src/components/tasks/TaskDetailView.vue @@ -398,6 +398,13 @@ } }, saveTask() { + + // If no end date is being set, but a start date and due date, + // use the due date as the end date + if (this.task.endDate === null && this.task.startDate !== null && this.task.dueDate !== null) { + this.task.endDate = this.task.dueDate + } + this.taskService.update(this.task) .then(r => { this.$set(this, 'task', r)