WIP: Note templates

Open username-removed-386624 requested to merge cs-note-templates into master

What does this MR do?

It adds "Note templates" which are templates for Issues, Merge Requests, and comments. Unlike repo-specific issue/MR templates, these are user-specific so users can use them to respond to common bugs, direct users somewhere else, ask for clarification on an issue, etc.

Are there points in the code the reviewer needs to double check?

  • Make sure the note templates work (obviously).
  • It doesn't cause strain on the server if a user has 100 note templates (should be loaded async and should cache the templates client-side?)
  • It's not frustrating to go between a dozen issues and use the templates (e.g. it's not slow, especially after they've been cached once)
  • It's easy to find a template in a long list of templates.
  • Users can't access each other's templates.

Why was this MR needed?

It's currently really frustrating to respond to issues or merge requests with the same comments over and over. This can make triaging issues a lot easier.

Credit to @adambutler in !3516 (closed) for starting this and creating the basis of it.

What are the relevant issue numbers?

Fixes #14796 (moved).

Screenshots (if relevant)

Note Template index in Profile Settings:


Creating a new Note Template:



  • CHANGELOG entry added
  • Documentation created/updated
  • API support added
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Fix bugs with design
  • Fix opening-multiple-dropdown bug
  • Add filtering
  • Add a link to the bottom of the dropdown for "Create a new note template"
  • Fix a bug where editing a Note Template causes a 404 error