Patch #38614 » email-handler-v2.patch
| app/models/mail_handler.rb | ||
|---|---|---|
|
options[:no_account_notice] = (options[:no_account_notice].to_s == '1')
|
||
|
options[:no_notification] = (options[:no_notification].to_s == '1')
|
||
|
options[:no_permission_check] = (options[:no_permission_check].to_s == '1')
|
||
|
options[:find_by_subject] = (options[:find_by_subject].to_s == '1')
|
||
|
ActiveSupport::Notifications.instrument("receive.action_mailer") do |payload|
|
||
|
mail = Mail.new(raw_mail.b)
|
||
| ... | ... | |
|
%w(project status tracker category priority assigned_to fixed_version).each do |option|
|
||
|
options[:issue][option.to_sym] = env[option] if env[option]
|
||
|
end
|
||
|
%w(allow_override unknown_user no_permission_check no_account_notice no_notification default_group project_from_subaddress).each do |option|
|
||
|
%w(allow_override unknown_user no_permission_check no_account_notice no_notification default_group project_from_subaddress find_by_subject).each do |option|
|
||
|
options[option.to_sym] = env[option] if env[option]
|
||
|
end
|
||
|
if env['private']
|
||
| ... | ... | |
|
MESSAGE_ID_RE = %r{^<?redmine\.([a-z0-9_]+)\-(\d+)\.\d+(\.[a-f0-9]+)?@}
|
||
|
ISSUE_REPLY_SUBJECT_RE = %r{\[(?:[^\]]*\s+)?#(\d+)\]}
|
||
|
ISSUE_REPLY_SUBJECT_RE2 = %r{^(?:Re:\s*)*(.*)$}i
|
||
|
MESSAGE_REPLY_SUBJECT_RE = %r{\[[^\]]*msg(\d+)\]}
|
||
|
def dispatch
|
||
| ... | ... | |
|
receive_issue_reply(m[1].to_i)
|
||
|
elsif m = subject.match(MESSAGE_REPLY_SUBJECT_RE)
|
||
|
receive_message_reply(m[1].to_i)
|
||
|
elsif handler_options[:find_by_subject]
|
||
|
logger&.info("MailHandler: trying to find issue by subject")
|
||
|
if issue = Issue.find_by(:subject => subject)
|
||
|
logger&.info("MailHandler: found issue #{issue.id} using the full subject")
|
||
|
receive_issue_reply(issue.id)
|
||
|
elsif m = subject.match(ISSUE_REPLY_SUBJECT_RE2)
|
||
|
if issue = Issue.find_by(:subject => m[1])
|
||
|
logger&.info("MailHandler: found issue #{issue.id} using the subject regex")
|
||
|
receive_issue_reply(issue.id)
|
||
|
end
|
||
|
else
|
||
|
dispatch_to_default
|
||
|
end
|
||
|
else
|
||
|
dispatch_to_default
|
||
|
end
|
||
| config/locales/bg.yml | ||
|---|---|---|
|
label_no_issues_in_project: никакви задачи в проект
|
||
|
label_any_open_issues: отворени задачи
|
||
|
label_no_open_issues: без отворени задачи
|
||
|
label_has_been: някога е било
|
||
|
label_has_never_been: никога не е било
|
||
|
label_changed_from: променено от
|
||
|
label_day_plural: дни
|
||
|
label_repository: Хранилище
|
||
|
label_repository_new: Ново хранилище
|
||
| ... | ... | |
|
label_latest_revision_plural: Последни ревизии
|
||
|
label_view_revisions: Виж ревизиите
|
||
|
label_view_all_revisions: Разглеждане на всички ревизии
|
||
|
label_view_previous_annotation: Показване на анотацията преди промяната
|
||
|
label_x_revisions: "%{count} ревизии"
|
||
|
label_max_size: Максимална големина
|
||
|
label_roadmap: Пътна карта
|
||
| ... | ... | |
|
button_edit_object: Редактиране %{object_name}
|
||
|
button_delete_object: Изтриване %{object_name}
|
||
|
button_create_and_follow: Създаване и продължаване
|
||
|
button_apply_issues_filter: Прилагане на филтъра
|
||
|
status_active: активен
|
||
|
status_registered: регистриран
|
||
| ... | ... | |
|
Това действие не може да бъде отменено. Често заключването на потребителя е по-добро решение от изтриването му.
|
||
|
За да потвърдите, въведете името (%{login}) по-долу.
|
||
|
text_project_destroy_enter_identifier: За да потвърдите действието, въведете идентификатора на проекта (%{identifier}) по-долу.
|
||
|
button_apply_issues_filter: Apply issues filter
|
||
|
label_view_previous_annotation: View annotation prior to this change
|
||
|
label_has_been: has been
|
||
|
label_has_never_been: has never been
|
||
|
label_changed_from: changed from
|
||