Project

General

Profile

Actions

Defect #1254

closed

In case default template defined, template loaded and append text when editing issue.

Added by NAITOH Jun almost 12 years ago. Updated over 11 years ago.

Status:
終了(Closed)
Priority:
通常(Normal)
Assignee:
Target version:
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

Related issues 1 (0 open1 closed)

Related to Issue Template - Defect #1218: Changing tracker causes disappearing of template selection終了(Closed)Akiko Takano03/26/2013

Actions
Actions #1

Updated by Akiko Takano over 11 years ago

  • Assignee set to Akiko Takano

ありがとうございます!
確認します!

Actions #2

Updated by Akiko Takano over 11 years ago

  • Status changed from 新規(New) to 担当(Assigned)
  • Target version set to ver0.0.6
Actions #3

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.

タイトルを調整。

Actions #4

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 で適用済み。
Actions #5

Updated by Akiko Takano over 11 years ago

#1218 と上記修正分、0.0.6に含めさせていただきますね。

Actions #6

Updated by NAITOH Jun over 11 years ago

修正ありがとうございます。
Redmine 2.2.3 で確認したところ、問題無く動作しました。:)

ありがとうございます。

Actions #7

Updated by Akiko Takano over 11 years ago

  • Status changed from 解決(Resolved) to 終了(Closed)
  • % Done changed from 70 to 100
Actions

Also available in: Atom PDF