Defect #1176
完了Changing tracker causes template to be appended, should be replaced
100%
説明
Changing the tracker while creating a new issue causes the template data to be appended, rather than replaced.
To reproduce...¶
- create a default issue template for multiple trackers, including the default tracker
- create a new issue
- this will use the default tracker, and will load the default template for that tracker
- change the tracker to another tracker with a default template defined
- this will append the new tracker's template to the existing template data from the oiginal tracker
Expected behavior¶
- create a new issue
- this will use the default tracker, and will load the default template for that tracker
- change the tracker to another tracker with a default template defined
- the default issue template for the new tracker replaces the template data from the previous tracker
Akiko Takano さんが11年以上前に更新
- ステータス を 新規(New) から 担当(Assigned) に変更
- 担当者 を Akiko Takano にセット
Hello, Ben.
Thank you for your feedback and I'm sorry for my delayed reply.
I think it would be better to append the template data than to replace, because I hope not to lose the description text that user writes down before loading template data.
Anyway, please try this workaround:
Please edit line 36 and 37 on plugins/redmine_issue_templates/assets/javascripts/issue_templates.js.
From:¶
$("#issue_description").val(oldVal + template.issue_template.description); $("#issue_subject").val(oldSubj + template.issue_template.issue_title);
To:¶
$("#issue_description").val(template.issue_template.description); $("#issue_subject").val(template.issue_template.issue_title);
Do you want to the feature to change the behavior between append and replace optionally?
(Exp. Manager can change the behavior from append to replace on template settings page.)
Akiko Takano さんが約11年前に更新
How is the situation and could you please give me any comments?
Ben Allen さんが約11年前に更新
That works very nicely!
I understand the desire to keep the user's entered text in the description. Since the fix is so simple, I can carry it forward as a local patch for our system.
It would be nice, however, if there was a way to make the choice as the template is created, similar to the "enabled" and "default" options.
Thank you!
Akiko Takano さんが9年以上前に更新
- ステータス を 担当(Assigned) から 終了(Closed) に変更
- 対象バージョン を削除 (
Future Release)
This option was already implemented in version 0.0.6, so closed.