Actions
Defect #1254
closedIn case default template defined, template loaded and append text when editing issue.
Start date:
07/19/2013
Due date:
% Done:
100%
Estimated time:
Description
Redmine Issue Templates plugin 0.0.5 + #1218 のパッチで Redmine 2.3.0 で運用しているのですが、
テンプレートの設定で「デフォルト値」にチェックがある場合、
チケット更新時、(発行時ではありません)ステータスを完了などに変更すると、
テンプレートが動作し、説明欄にテンプレートの内容が追記で増殖していきます。
おそらく、下記機能の影響で、Redmine 2.1 以降、
ステータス変更時にワークフローの権限チェックが動作するようになったので
その時にテンプレートが呼ばれている感じです。
http://blog.redmine.jp/articles/new-feature-2_1/configurable-require-fields/
環境¶
- RHEL 5.3(x64)
- ruby 1.8.7
Updated by Akiko Takano over 11 years ago
- Status changed from 新規(New) to 担当(Assigned)
- Target version set to ver0.0.6
Updated by Akiko Takano over 11 years ago
- Subject changed from Defect from Bitbucket #NNNN to In case default template defined, template loaded and append text when editing issue.
タイトルを調整。
Updated by Akiko Takano over 11 years ago
- Status changed from 担当(Assigned) to 解決(Resolved)
- % Done changed from 0 to 70
なんとも怪しいSubjectですみません..(適切な訳が出来るといいんですが)
update_formはチケットの新規作成時と、編集時の2パターンがありますので、『新規」のみに限定するように下記の通り調整で如何でしょう。
def view_issues_form_details_top(context={})
action = context[:request].parameters[:action]
project_id = context[:request].parameters[:project_id]
+ issue_id = context[:request].parameters[:id]
- return '' unless (action == 'new' or action == 'update_form' or action == 'create') && !project_id.blank?
+ return '' unless (action == 'new' or action == 'update_form' or action == 'create') && !project_id.blank? && issue_id.blank?
context[:controller].send(
:render_to_string,
{
:partial => 'issue_templates/issue_select_form'
}
)
end
commits:33ee9e で適用済み。
Updated by NAITOH Jun over 11 years ago
修正ありがとうございます。
Redmine 2.2.3 で確認したところ、問題無く動作しました。
ありがとうございます。
Updated by Akiko Takano over 11 years ago
- Status changed from 解決(Resolved) to 終了(Closed)
- % Done changed from 70 to 100
Actions