Skip to content

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:

  1. Type # in the related issue input
  2. Click a reference
  3. 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?

What are the relevant issue numbers?

Closes #2914 (closed)

Edited by username-removed-892863

Merge request reports