プロジェクト

全般

プロフィール

QA #798

未完了

メールから取り込んだチケットにメールヘッダ情報も取り込みたい

Nagashima Nobuhiro さんが約6年前に追加. ほぼ6年前に更新.

ステータス:
新規
優先度:
通常
担当者:
-
カテゴリ:
-
対象バージョン:
-
開始日:
2018/04/25
期日:
進捗率:

0%

予定工数:

説明

Redmineでメール受けをしており、チケット化しているのですが、
どの宛先に取り込んだチケット内容が送信されているのか不明なため、
メール内容だけでなく、TO/CCのメールヘッダ情報もチケットに取り込みたいと考えているのですが、
可能なのでしょうか。

楠川 智久 さんが約6年前に更新

+1

楠川 智久 さんが約6年前に更新

  • 次のチケットが重複 QA #799: 誤起票のため削除 を追加

前田 剛 さんが約6年前に更新

近い内容のリクエストがredmine.orgにありましたが、1件もコメントがついていない状態です。

Feature #21158: Send E-Mail to Redmine: Copy E-Mail Header into Ticket Note

奈良 裕記 さんが約6年前に更新

  • 次のチケットが重複 を削除 (QA #799: 誤起票のため削除)

奈良 裕記 さんが約6年前に更新

Redmine本体の関連部分を修正したら行けるかもしれませんね

送信先でしたら 以下に email.to を出力する処理を追加するとか。

http://www.redmine.org/projects/redmine/repository/entry/branches/3.4-stable/app/models/mail_handler.rb


  def dispatch
    headers = [email.in_reply_to, email.references].flatten.compact
    subject = email.subject.to_s
    if headers.detect {|h| h.to_s =~ MESSAGE_ID_RE}
      klass, object_id = $1, $2.to_i
      method_name = "receive_#{klass}_reply" 
      if self.class.private_instance_methods.collect(&:to_s).include?(method_name)
        send method_name, object_id
      else
        # ignoring it
      end
    elsif m = subject.match(ISSUE_REPLY_SUBJECT_RE)
      receive_issue_reply(m[1].to_i)
    elsif m = subject.match(MESSAGE_REPLY_SUBJECT_RE)
      receive_message_reply(m[1].to_i)
    else
      dispatch_to_default
    end

関連箇所

http://www.redmine.org/projects/redmine/repository/entry/branches/3.4-stable/app/controllers/mail_handler_controller.rb # Submits an incoming email to MailHandler
def index
。。。

http://www.redmine.org/projects/redmine/repository/entry/branches/3.4-stable/app/models/mail_handler.rb

class MailHandler < ActionMailer::Base

def self.receive(raw_mail, options={})
。。
  1. Processes incoming emails
  2. Returns the created object (eg. an issue, a message) or false
    def receive(email, options={})
    。。

奈良 裕記 さんが約6年前に更新

フォローありがとうございました>楠川さん、前田さん

799は明らかな誤操作なので削除したいのですが、削除権限無し。。

楠川 智久 さんがほぼ6年前に更新

削除はしなくて大丈夫で、追えるようにリンクしてキャンセルとかの方が未来の人が助かると思います。

奈良 裕記 さんがほぼ6年前に更新

  • プロジェクトredmine.tokyo から Unofficial Redmine Cooking に変更

プロジェクト移動しました。

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