Warn before applying issue templates

internal customer since GitLabbers use issue templates, and use it across many different departments for different GitLab business processes.


Description

Currently changing issue templates will replace content without warning even if the template has been edited.

Proposal

  • If a user tries to apply a template and the have not manually modified the content of the description field (added or removed text), the chosen template should automatically replace that content without asking for confirmation. For example, if the user has not changed the original description template (“Before raising an issue to the GitLab Community Edition…”), it should be automatically replaced with the chosen template.
  • If a user tries to apply a template and they have indeed modified the content of the description field (added or removed text), an alert should be shown asking if they want to apply the chosen template (which will discard their changes) or cancel:

alert

🔍 Alert specs

Note:

  • The alert with two buttons has not been added to the specs yet
  • The primary button will be btn-warning and there is 8px of space between the two buttons.
  • The X button will do the same as Cancel

Original Issue

The regression bug described below has been fixed by !7050 (merged)

Summary

This seems to be a regression bug whereby the issue template is appending to the existing description rather than replacing the description.

Steps to reproduce

  1. Create a new issue on this repo (GitLab CE)
  2. Select bug or feature proposal template
  3. Notice that the template appends to the description

Actual behavior

Template is appended to existing description

Relevant logs and/or screenshots

2016-10-13_16.00.30

Edited by Annabel Dunstone Gray