Feature #2716 » auto_watch_assignee.patch
| app/models/journal.rb | ||
|---|---|---|
|
!Watcher.any_watched?(Array.wrap(journalized), user)
|
||
|
journalized.set_watcher(user, true)
|
||
|
end
|
||
|
assignee = journalized.assigned_to
|
||
|
if assignee.is_a?(User) && assignee&.active? &&
|
||
|
assignee.allowed_to?(:add_issue_watchers, project) &&
|
||
|
assignee.pref.auto_watch_on?('issue_assigned_to_me') &&
|
||
|
!Watcher.any_watched?(Array.wrap(journalized), assignee)
|
||
|
journalized.set_watcher(assignee, true)
|
||
|
end
|
||
|
end
|
||
|
def send_notification
|
||
| app/models/user_preference.rb | ||
|---|---|---|
|
TEXTAREA_FONT_OPTIONS = ['monospace', 'proportional']
|
||
|
DEFAULT_TOOLBAR_LANGUAGE_OPTIONS = %w[c cpp csharp css diff go groovy html java javascript objc perl php python r ruby sass scala shell sql swift xml yaml]
|
||
|
AUTO_WATCH_ON_OPTIONS = %w[issue_created issue_contributed_to]
|
||
|
AUTO_WATCH_ON_OPTIONS = %w[issue_created issue_contributed_to issue_assigned_to_me]
|
||
|
def initialize(attributes=nil, *args)
|
||
|
super
|
||
| config/locales/en.yml | ||
|---|---|---|
|
label_auto_watch_on: Auto watch
|
||
|
label_auto_watch_on_issue_created: Issues I created
|
||
|
label_auto_watch_on_issue_contributed_to: Issues I contributed to
|
||
|
label_auto_watch_on_issue_assigned_to_me: Issues assigned to me
|
||
|
label_preferences: Preferences
|
||
|
label_chronological_order: In chronological order
|
||
|
label_reverse_chronological_order: In reverse chronological order
|
||