You can create without setting anything in the tracker when creating a note template for a project. I think it is wrong to be able to create a note template even though the tracker is required.
Therefore, when redrawing the note template after creation, an Internal error exception occurs in the following place.
An Internal error exception occurs, but the note template has been created, so if you try to create a note template with the same template name in the same project, "Name has already been taken" error message will be displayed.
[1] pry(main)> NoteTemplate.all
NoteTemplate Load (2.8ms) SELECT "note_templates".* FROM "note_templates"
=> [#<NoteTemplate:0x00007f9a8dd44cf0
id: 1,
name: "test1",
description: "test1",
memo: "",
project_id: 7,
tracker_id: nil,
author_id: 1,
enabled: false,
position: 1,
created_at: Thu, 24 Mar 2022 02:39:05 UTC +00:00,
updated_at: Thu, 24 Mar 2022 02:39:05 UTC +00:00,
visibility: "open">]
Environment
Redmine version
4.2-stable
Installed plugins
redmine_issue_templates: 0.3-stable(Maybe it also happens on the master branch)
Summary
You can create without setting anything in the tracker when creating a note template for a project. I think it is wrong to be able to create a note template even though the tracker is required.
Therefore, when redrawing the note template after creation, an Internal error exception occurs in the following place.
An Internal error exception occurs, but the note template has been created, so if you try to create a note template with the same template name in the same project, "Name has already been taken" error message will be displayed.
Environment