Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed a crash when redmine "assign to group" is turned on #1

Merged
merged 1 commit into from

2 participants

@bensonk

If an issue was assigned to a group, this plugin would attempt to add that group as a watcher. Since that isn't a supported action, I added a clause to the conditional guard to prevent this. That fixes the crash.

@mezza mezza merged commit 56179db into mezza:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 27, 2012
  1. @bensonk
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/auto_watch_hook.rb
View
4 lib/auto_watch_hook.rb
@@ -5,8 +5,8 @@ def controller_issues_edit_before_save(context = { })
unless @issue.watched_by?(User.current) || @issue.author == User.current
@issue.add_watcher(User.current)
end
- unless @issue.assigned_to == nil || @issue.watched_by?(@issue.assigned_to) || @issue.author == @issue.assigned_to
+ unless @issue.assigned_to == nil || (not @issue.assigned_to === User) || @issue.watched_by?(@issue.assigned_to) || @issue.author == @issue.assigned_to
@issue.add_watcher(@issue.assigned_to)
end
end
-end
+end
Something went wrong with that request. Please try again.