Available watchers on new issue form include users who cannot even view issues
The proposed watchers on the new issue form should be able to at least view issues. Otherwise it would not make sense to add them as watchers.
The attached patch fixes the behavior and makes it consistent with source:trunk/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb@11960#L36
No test for now, though.
#11 Updated by Marius BALTEANU over 2 years ago
Here are some ideas in order to avoid the overhead:1. If we really want to show some watchers in the new issue form:
- Get first 20 users from the database and check the visibility only for them
- Get more users from the database and check the visibility until we get 20 users that can watch the issue.
- Load them async.
2. If not, we just display the "Search for watchers to add" link to the user.
If we go for 1, we need also to load the watchers form when the tracker/project changes.