Patch #13413 » changeset_r71317ed3d9fa6bcdaf9eadcf9f18684a31a5f6ad.diff
| app/models/mailer.rb | ||
|---|---|---|
|
issues_by_assignee = scope.all(:include => [:status, :assigned_to, :project, :tracker]).group_by(&:assigned_to)
|
||
|
issues_by_assignee.each do |assignee, issues|
|
||
|
deliver_reminder(assignee, issues, days) if assignee.is_a?(User) && assignee.active?
|
||
|
if assignee.is_a?(User) && assignee.active? && assignee.pref.reminder_days.present?
|
||
|
pref_days = assignee.pref.reminder_days.to_i
|
||
|
issues.reject!{|issue| issue.due_date.to_datetime > pref_days.days.from_now }
|
||
|
deliver_reminder(assignee, issues, pref_days < days ? pref_days : days) if issues.any?
|
||
|
end
|
||
|
end
|
||
|
end
|
||
| app/models/user_preference.rb | ||
|---|---|---|
|
def default_assign_issues_to_me; self[:default_assign_issues_to_me] || '0'; end
|
||
|
def default_assign_issues_to_me=(value); self[:default_assign_issues_to_me]=value; end
|
||
|
def reminder_days; self[:reminder_days] || ''; end
|
||
|
def reminder_days=(value); self[:reminder_days] = value.blank? ? '' : value.to_i; end
|
||
|
end
|
||
| app/views/users/_preferences.html.erb | ||
|---|---|---|
|
<p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
|
||
|
<p><%= pref_fields.check_box :warn_on_leaving_unsaved %></p>
|
||
|
<p><%= pref_fields.check_box :default_assign_issues_to_me %></p>
|
||
|
<p><%= pref_fields.text_field :reminder_days, :size => 6 %> <%= l(:label_before) %>
|
||
|
<em class="info"><%= l(:text_reminder_days) %></em></p>
|
||
|
<% end %>
|
||
| config/locales/de.yml | ||
|---|---|---|
|
label_less_than_ago: vor weniger als
|
||
|
label_more_than_ago: vor mehr als
|
||
|
label_ago: vor
|
||
|
label_before: Tage vorher
|
||
|
label_contains: enthält
|
||
|
label_not_contains: enthält nicht
|
||
|
label_day_plural: Tage
|
||
| ... | ... | |
|
setting_gantt_items_limit: Maximale Anzahl von Tickets die im Gantt-Chart angezeigt werden.
|
||
|
field_default_assign_issues_to_me: Tickets die ich anlege mir selbst zuweisen
|
||
|
field_warn_on_leaving_unsaved: vor dem Verlassen einer Seite mit ungesichertem Text im Editor warnen
|
||
|
field_reminder_days: E-Mail-Erinnerung für fällige Tickets
|
||
|
text_warn_on_leaving_unsaved: Die aktuellen Änderungen gehen verloren, wenn Sie diese Seite verlassen.
|
||
|
text_reminder_days: Feld leer lassen für keine Erinnerungen
|
||
|
label_my_queries: Meine eigenen Abfragen
|
||
|
text_journal_changed_no_detail: "%{label} aktualisiert"
|
||
|
label_news_comment_added: Kommentar zu einem Blog-Artikel hinzugefügt
|
||
| config/locales/en.yml | ||
|---|---|---|
|
field_visible: Visible
|
||
|
field_default_assign_issues_to_me: Assign new issues to myself by default
|
||
|
field_warn_on_leaving_unsaved: "Warn me when leaving a page with unsaved text"
|
||
|
field_reminder_days: Due issue email reminders
|
||
|
field_issues_visibility: Issues visibility
|
||
|
field_is_private: Private
|
||
|
field_commit_logs_encoding: Commit messages encoding
|
||
| ... | ... | |
|
label_less_than_ago: less than days ago
|
||
|
label_more_than_ago: more than days ago
|
||
|
label_ago: days ago
|
||
|
label_before: days before
|
||
|
label_contains: contains
|
||
|
label_not_contains: doesn't contain
|
||
|
label_day_plural: days
|
||
| ... | ... | |
|
text_issue_conflict_resolution_cancel: "Discard all my changes and redisplay %{link}"
|
||
|
text_account_destroy_confirmation: "Are you sure you want to proceed?\nYour account will be permanently deleted, with no way to reactivate it."
|
||
|
text_session_expiration_settings: "Warning: changing these settings may expire the current sessions including yours."
|
||
|
text_reminder_days: Leave blank for no reminders
|
||
|
default_role_manager: Manager
|
||
|
default_role_developer: Developer
|
||
| test/fixtures/user_preferences.yml | ||
|---|---|---|
|
user_preferences_002:
|
||
|
others: |
|
||
|
---
|
||
|
:reminder_days: 42
|
||
|
:my_page_layout:
|
||
|
left:
|
||
|
- latestnews
|
||