Problem description: When attempting to unlink and clear a template using the Template mass update action, the template that is chosen in the "Linked templates" replaces all existing templates for templates that were selected for the mass update action (Works same as replace operation).
Steps to reproduce:
- Open the list of templates
- Link some template to one of the templates
- Select a couple of templates, including the one with the linked template, and press Mass update button
- In the opened dialogue go to "Linked templates tab" and select the linked template from step 2 in the multiselect
- Set "Unlink and clear" checkbox and choose "Unlink" in the redio-button
- Press update
- Check configuration of the previously selected templates
Result: the template that was supposed to be unlinked is now preset under all templates selected for the Mass update action (it replaced all linked templates)
Expected: The template should've been unlinked and its items should've been removed.