Fix duplicate related issue reference inserted when using autocomplete
What does this MR do?
Fix duplicate related issue reference inserted when using autocomplete
Are there points in the code the reviewer needs to double check?
Reproduction:
- Type
#
in the related issue input - Click a reference
- Notice two tokens get added
Why was this MR needed?
https://gitlab.com/gitlab-org/gitlab-ee/commit/932b94f911394543a0377d712b2b28da827e4aad#5c81a39dd0a93216b1a0f2dcc14fa6ef4da373eb_33_33 in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12720 started emitting a new input
event which we were previously handling from the inserted-issues.atwho
event. Test coverage in related issues was missing for using autocomplete to fill in the input even though it would be more testing if gfm_auto_complete
did its job.
Does this MR meet the acceptance criteria?
- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #2914 (closed)
Edited by Eric Eastwood