Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bc753559
Commit
bc753559
authored
May 03, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle errors in successful notes reply
parent
0625ccc6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
app/assets/javascripts/notes/stores/actions.js
app/assets/javascripts/notes/stores/actions.js
+13
-4
changelogs/unreleased/winh-notes-error-handling.yml
changelogs/unreleased/winh-notes-error-handling.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
app/assets/javascripts/notes/stores/actions.js
View file @
bc753559
...
...
@@ -268,11 +268,20 @@ export const saveNote = ({ commit, dispatch }, noteData) => {
const
{
errors
}
=
res
;
const
commandsChanges
=
res
.
commands_changes
;
if
(
hasQuickActions
&&
errors
&&
Object
.
keys
(
errors
).
length
)
{
eTagPoll
.
makeRequest
();
if
(
errors
&&
Object
.
keys
(
errors
).
length
)
{
/*
The following reply means that quick actions have been successfully applied:
$
(
'
.js-gfm-input
'
).
trigger
(
'
clear-commands-cache.atwho
'
);
Flash
(
__
(
'
Commands applied
'
),
'
notice
'
,
noteData
.
flashContainer
);
{"commands_changes":{},"valid":false,"errors":{"commands_only":["Commands applied"]}}
*/
if
(
hasQuickActions
)
{
eTagPoll
.
makeRequest
();
$
(
'
.js-gfm-input
'
).
trigger
(
'
clear-commands-cache.atwho
'
);
Flash
(
__
(
'
Commands applied
'
),
'
notice
'
,
noteData
.
flashContainer
);
}
else
{
throw
new
Error
(
__
(
'
Failed to save comment!
'
));
}
}
if
(
commandsChanges
)
{
...
...
changelogs/unreleased/winh-notes-error-handling.yml
0 → 100644
View file @
bc753559
---
title
:
Handle errors in successful notes reply
merge_request
:
28082
author
:
type
:
fixed
locale/gitlab.pot
View file @
bc753559
...
...
@@ -4196,6 +4196,9 @@ msgstr ""
msgid "Failed to remove user key."
msgstr ""
msgid "Failed to save comment!"
msgstr ""
msgid "Failed to save merge conflicts resolutions. Please try again!"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment