プロジェクト

全般

プロフィール

Defect #1176

完了

Changing tracker causes template to be appended, should be replaced

Ben Allen さんが11年以上前に追加. 9年以上前に更新.

ステータス:
終了(Closed)
優先度:
通常(Normal)
担当者:
対象バージョン:
-
開始日:
2013/01/22
期日:
進捗率:

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

Ben Allen さんが11年以上前に更新

The same happens with non-default issue templates.

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 さんが約11年前に更新

  • 対象バージョンver0.0.6 にセット

Akiko Takano さんがほぼ11年前に更新

  • 対象バージョンver0.0.6 から Future Release に変更

Akiko Takano さんが9年以上前に更新

  • ステータス担当(Assigned) から 終了(Closed) に変更
  • 対象バージョン を削除 (Future Release)

This option was already implemented in version 0.0.6, so closed.

Akiko Takano さんが9年以上前に更新

  • 進捗率0 から 100 に変更

他の形式にエクスポート: Atom PDF