Patch #11495 ยป issue-reopen.patch
app/models/mail_handler.rb | ||
---|---|---|
190 | 190 |
@@handler_options[:issue].clear |
191 | 191 | |
192 | 192 |
journal = issue.init_journal(user) |
193 |
# Reopen issue on new mail reply |
|
194 |
if issue.closed? && Setting.mail_handler_reopen_on_reply? |
|
195 |
issue.status = IssueStatus.named(Setting.mail_handler_reopen_status).first || IssueStatus.default |
|
196 |
end |
|
193 | 197 |
issue.safe_attributes = issue_attributes_from_keywords(issue) |
194 | 198 |
issue.safe_attributes = {'custom_field_values' => custom_field_values_from_keywords(issue)} |
195 | 199 |
journal.notes = cleaned_up_text_body |
app/views/settings/_mail_handler.html.erb | ||
---|---|---|
18 | 18 |
</p> |
19 | 19 |
</div> |
20 | 20 | |
21 |
<div class="box tabular settings"> |
|
22 |
<p><%= setting_check_box :mail_handler_reopen_on_reply, |
|
23 |
:onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_reopen_status'); } else { Form.Element.disable('settings_mail_handler_reopen_status'); }" %></p> |
|
24 |
<p><%= setting_select :mail_handler_reopen_status, |
|
25 |
IssueStatus.all.reject{|s| s.is_closed?}.collect{|s| [s.name, s.name]}, |
|
26 |
:disabled => !Setting.mail_handler_reopen_on_reply? %></p> |
|
27 |
</div> |
|
28 | ||
21 | 29 |
<%= submit_tag l(:button_save) %> |
22 | 30 | |
23 | 31 |
<% end %> |
config/locales/en.yml | ||
---|---|---|
365 | 365 |
setting_mail_handler_body_delimiters: "Truncate emails after one of these lines" |
366 | 366 |
setting_mail_handler_api_enabled: Enable WS for incoming emails |
367 | 367 |
setting_mail_handler_api_key: API key |
368 |
setting_mail_handler_reopen_on_reply: Reopen closed issues on email reply |
|
369 |
setting_mail_handler_reopen_status: Reopen with this status |
|
368 | 370 |
setting_sequential_project_identifiers: Generate sequential project identifiers |
369 | 371 |
setting_gravatar_enabled: Use Gravatar user icons |
370 | 372 |
setting_gravatar_default: Default Gravatar image |
config/settings.yml | ||
---|---|---|
148 | 148 |
default: 0 |
149 | 149 |
mail_handler_api_key: |
150 | 150 |
default: |
151 |
mail_handler_reopen_on_reply: |
|
152 |
default: 0 |
|
153 |
mail_handler_reopen_status: |
|
154 |
default: '' |
|
151 | 155 |
issue_list_default_columns: |
152 | 156 |
serialized: true |
153 | 157 |
default: |