diff options
-rw-r--r-- | app/assets/javascripts/issue_show/components/app.vue | 9 | ||||
-rw-r--r-- | app/assets/javascripts/issue_show/components/description.vue | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/issue_show/components/app.vue b/app/assets/javascripts/issue_show/components/app.vue index 3e71c40e896..0428e099279 100644 --- a/app/assets/javascripts/issue_show/components/app.vue +++ b/app/assets/javascripts/issue_show/components/app.vue @@ -213,6 +213,14 @@ export default { return undefined; }, + updateStoreState() { + this.service.getData() + .then(res => res.data) + .then(data => { + this.store.updateState(data); + }); + }, + openForm() { if (!this.showForm) { this.showForm = true; @@ -327,6 +335,7 @@ export default { :issuable-type="issuableType" :update-url="updateEndpoint" :lock-version="state.lock_version" + @taskListUpdateFailed="updateStoreState" /> <edited-component v-if="hasUpdated" diff --git a/app/assets/javascripts/issue_show/components/description.vue b/app/assets/javascripts/issue_show/components/description.vue index d5b355a39a2..519012b7df9 100644 --- a/app/assets/javascripts/issue_show/components/description.vue +++ b/app/assets/javascripts/issue_show/components/description.vue @@ -89,8 +89,10 @@ export default { } }, - taskListUpdateError(data) { - createFlash(data.errors[0]); + taskListUpdateError({ errors, data }) { + createFlash('Someone edited this issue at the same time you did and we updated the issue description.'); + + this.$emit('taskListUpdateFailed'); }, updateTaskStatusText() { |