Actions
Feature #42880
closedMake 'auto watch issues' default user settings configurable
Status:
Closed
Priority:
Normal
Assignee:
Category:
Accounts / authentication
Target version:
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Description
- Exposed the new setting in the administration UI, so administrators can choose which events trigger auto watching by default
- Initialized user preferences to use the configured default auto-watch options when creating new users
- Added a new setting in config/settings.yml that lists the default automatic watch options for new users
- Updated unit tests to verify both the configurable default and the built-in fallback options
Files
Updated by Marius BĂLTEANU 11 days ago
- Status changed from New to Resolved
- Assignee set to Marius BĂLTEANU
- Resolution set to Fixed
Feature added, thanks!
Updated by Katsuya HIDAKA 10 days ago
It seems that commit r23956 caused the following test to fail:
https://github.com/redmine/redmine/actions/runs/17525877800/job/49776196037#step:5:49
Failure: UserPreferenceTest#test_auto_watch_on_should_default_to_options [test/unit/user_preference_test.rb:72]: --- expected +++ actual @@ -1 +1 @@ -["issue_created", "issue_contributed_to"] +"" bin/rails test test/unit/user_preference_test.rb:69
Note that several other tests are also failing, but I believe those are due to a different cause.
Updated by Katsuya HIDAKA 10 days ago
Here is the patch for #note-4.
diff --git a/test/unit/user_preference_test.rb b/test/unit/user_preference_test.rb
index fd51b1d9f..582520402 100644
--- a/test/unit/user_preference_test.rb
+++ b/test/unit/user_preference_test.rb
@@ -67,10 +67,8 @@ class UserPreferenceTest < ActiveSupport::TestCase
end
def test_auto_watch_on_should_default_to_options
- with_settings :default_users_auto_watch_on => nil do
- preference = UserPreference.new
- assert_equal %w[issue_created issue_contributed_to], preference.auto_watch_on
- end
+ preference = UserPreference.new
+ assert_equal %w[issue_created issue_contributed_to], preference.auto_watch_on
end
def test_create
Updated by Marius BĂLTEANU 10 days ago
I've fixed for now the test by removing the invalid with_settings :default_users_auto_watch_on => nil
, I'm going to review the cases later.
Actions