diff options
author | Phil Hughes <me@iamphill.com> | 2018-03-09 18:22:23 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-03-09 18:22:23 +0000 |
commit | 52b70f0428151dcc6f4154fa584e9478afc34e9e (patch) | |
tree | e700010a4c19371ff3fdb798e8a7518f5e71b51e /app | |
parent | f2723fc3e9c4f7923255f2644932e129a8047653 (diff) | |
download | gitlab-ce-52b70f0428151dcc6f4154fa584e9478afc34e9e.tar.gz |
Fixed issue notes being duplicated
Closes #44099
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/notes/stores/actions.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/notes/stores/mutations.js | 4 | ||||
-rw-r--r-- | app/helpers/notes_helper.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/notes/stores/actions.js b/app/assets/javascripts/notes/stores/actions.js index 42fc2a131b8..3eaae0bc683 100644 --- a/app/assets/javascripts/notes/stores/actions.js +++ b/app/assets/javascripts/notes/stores/actions.js @@ -197,7 +197,7 @@ const pollSuccessCallBack = (resp, commit, state, getters) => { }); } - commit(types.SET_LAST_FETCHED_AT, resp.lastFetchedAt); + commit(types.SET_LAST_FETCHED_AT, resp.last_fetched_at); return resp; }; diff --git a/app/assets/javascripts/notes/stores/mutations.js b/app/assets/javascripts/notes/stores/mutations.js index 963b40be3fd..aed0a44e808 100644 --- a/app/assets/javascripts/notes/stores/mutations.js +++ b/app/assets/javascripts/notes/stores/mutations.js @@ -90,15 +90,15 @@ export default { const notes = []; notesData.forEach((note) => { - const nn = Object.assign({}, note); - // To support legacy notes, should be very rare case. if (note.individual_note && note.notes.length > 1) { note.notes.forEach((n) => { + const nn = Object.assign({}, note); nn.notes = [n]; // override notes array to only have one item to mimick individual_note notes.push(nn); }); } else { + const nn = Object.assign({}, note); const oldNote = utils.findNoteObjectById(state.notes, note.id); nn.expanded = oldNote ? oldNote.expanded : note.expanded; diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index a70e73a6da9..20aed60cb7a 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -169,7 +169,7 @@ module NotesHelper reopenPath: reopen_issuable_path(issuable), notesPath: notes_url, totalNotes: issuable.discussions.length, - lastFetchedAt: Time.now + lastFetchedAt: Time.now.to_i }.to_json end |