1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-24 09:21:12 +00:00

3310 Commits

Author SHA1 Message Date
Go MAEDA
9052d4d05b Optimize watchers list rendering by eager loading email addresses (#42589).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23722 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-04-27 08:27:08 +00:00
Go MAEDA
646bb36874 Joining both atom_token and api_token on the User model causes an error due to the ambiguous column name "action" (#42622).
Patch by Lorin Thwaits (user:lorint).


git-svn-id: https://svn.redmine.org/redmine/trunk@23712 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-04-25 04:37:30 +00:00
Go MAEDA
a1b5495e89 Fix Rubocop Style/ArgumentsForwarding (#42496).
git-svn-id: https://svn.redmine.org/redmine/trunk@23698 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-04-21 05:57:01 +00:00
Go MAEDA
ce94a1d71a Adds interval ratio setting to progressbar custom field (#42335).
Patch by Marius BĂLTEANU (user:marius.balteanu) and Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23686 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-04-19 08:46:02 +00:00
Go MAEDA
41ed48fd7d NoMethodError when creating a user with an invalid email address and domain restrictions are enabled (#42584).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23666 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-04-18 07:43:14 +00:00
Go MAEDA
08ea4e0323 Fix RuboCop Style/RedundantCondition (#41884).
git-svn-id: https://svn.redmine.org/redmine/trunk@23627 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-04-11 09:21:17 +00:00
Go MAEDA
dcdd453287 Fix RuboCop Lint/SharedMutableDefault (#41884).
Although `Hash.new {|h, k| h[k] = []}` is commonly used for this pattern, `Hash.new {|_h, _k| []}` is more appropriate here to avoid modifying the hash when accessing missing keys, which would cause `UserTest#test_accessing_projects_by_role_with_no_projects_should_return_an_empty_array` to fail.


git-svn-id: https://svn.redmine.org/redmine/trunk@23622 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-04-11 07:43:44 +00:00
Go MAEDA
ec73d02347 Fix slow loading of global spent time list in MySQL (#40728).
In MySQL, the query to retrieve the global spent time list is sometimes extremely slow (taking several minutes in some environments) due to an inefficient join order chosen by the query optimizer. This patch adds an optimizer hint to improve the join order and ensure consistent performance.

Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23609 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-04-08 01:30:37 +00:00
Go MAEDA
508c1fd548 Improve performance of TimeEntry#assignable_users by reducing SQL queries (#35927).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23595 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-04-02 09:22:35 +00:00
Marius Balteanu
472d2a2797 Fixes wrong condition added in r23586 (#13596).
git-svn-id: https://svn.redmine.org/redmine/trunk@23589 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-03-30 08:59:54 +00:00
Marius Balteanu
59daaa27e9 Fixes rubocop offense "[Correctable] Lint/SafeNavigationConsistency: Use . instead of unnecessary &.." (#13596).
git-svn-id: https://svn.redmine.org/redmine/trunk@23588 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-03-30 08:31:05 +00:00
Marius Balteanu
3c57eaffd4 Add administration setting to allow time logging on closed issues. By default, the setting is enabled (#13596).
git-svn-id: https://svn.redmine.org/redmine/trunk@23586 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-03-30 07:48:53 +00:00
Marius Balteanu
77c6556ea7 Adds missing files (#42352).
Patch by Holger Just (user:hjust).

git-svn-id: https://svn.redmine.org/redmine/trunk@23532 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-03-10 00:32:13 +00:00
Marius Balteanu
1f46b0b236 Extract project query for admins to a separate ProjectAdminQuery model (#42352).
Patch by Holger Just (user:hjust).

git-svn-id: https://svn.redmine.org/redmine/trunk@23531 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-03-09 23:25:12 +00:00
Marius Balteanu
3c5f0af44d Ensure that a UserQuery can only be viewed or edited by admins (#42352).
Patch by Holger Just (user:hjust).

git-svn-id: https://svn.redmine.org/redmine/trunk@23530 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-03-09 23:22:46 +00:00
Marius Balteanu
10971361fa Allow query class to select layout for QueriesController (#42352).
Patch by Holger Just (user:hjust).

git-svn-id: https://svn.redmine.org/redmine/trunk@23529 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-03-09 23:20:50 +00:00
Go MAEDA
b15b5f72b3 Fix RuboCop Style/SuperArguments (#41884).
git-svn-id: https://svn.redmine.org/redmine/trunk@23491 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-02-06 04:06:02 +00:00
Go MAEDA
c252857414 Reduce SQL queries triggered by empty? and one? in TimeEntryActivity.default_activity_id by preloading available_activities (#42150).
git-svn-id: https://svn.redmine.org/redmine/trunk@23478 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-01-30 03:34:38 +00:00
Go MAEDA
7aacf5718c Optimize TimeEntryActivity#default_activity_id method by introducing early returns to reduce SQL queries (#42150).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23477 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-01-29 09:40:28 +00:00
Go MAEDA
7ca4cf24c0 Refactor Member#role_ids= method for improved clarity and effficiency in removing obsolete member roles (#42124).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23451 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-01-21 01:50:28 +00:00
Go MAEDA
2ffe3fa547 Optimize Version#wiki_page method (#42121).
Avoid unnecessary evaluation of `project.wiki` when `wiki_page_title` is blank, reducing redundant SQL queries.

Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23450 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-01-20 08:36:22 +00:00
Go MAEDA
382ff17fa4 Member roles are incorrectly added when a user's memberships are updated (#42106).
Patch by Thomas Löber (user:tloeber) and Mizuki ISHIKAWA (user:ishikawa999).


git-svn-id: https://svn.redmine.org/redmine/trunk@23449 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-01-19 07:32:26 +00:00
Go MAEDA
0dcc20eed3 Preload tracker when retrieving journal events to improve Activity view performance (#42077).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23447 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-01-18 05:37:55 +00:00
Go MAEDA
cf4a72d3f5 Optimize journalized method to use preloaded Issue association for better Activity view performance (#42077).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23446 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-01-18 05:36:19 +00:00
Go MAEDA
3712ecb01f Fix NoMethodError in IssuePriority#high and #low when no default or active priorities exist (#42066).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23431 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-01-05 03:04:59 +00:00
Go MAEDA
b437ebda49 FrozenError when using SQLite3 gem version 2.0.0 or later (#41860).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23308 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-11-25 06:17:20 +00:00
Marius Balteanu
db0ac01d3d Fixes project query scope that does not take into account limit and offset options (#41791).
git-svn-id: https://svn.redmine.org/redmine/trunk@23300 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-11-23 11:17:54 +00:00
Marius Balteanu
586020045b @ProjectQuery#results_scope@ should return @Project::ActiveRecord_Relation@ to keep the backward compatibility (#41678, #23954).
Patch by Nishida Yuya (user:nishidayuya).



git-svn-id: https://svn.redmine.org/redmine/trunk@23187 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-11-03 11:56:23 +00:00
Go MAEDA
c54474eccc Fix: "Import issues" and "Import time entries" pages are visible to users without "Add issues" and "Log spent time" permissions (#41465).
Patch by Kenta Kumojima (user:kumojima).


git-svn-id: https://svn.redmine.org/redmine/trunk@23178 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-11-03 05:41:19 +00:00
Go MAEDA
a253cd1636 Fix: updated_by_id in Journal points to a deleted user instead of an anonymous user (#41572).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23169 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-10-29 01:02:04 +00:00
Go MAEDA
1d46be8b0f Fix CSV import file encoding auto-detection failure with multibyte characters (#41464).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23150 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-10-20 06:47:28 +00:00
Go MAEDA
95add1af5c Include attachment filename in "File added" email notification subject (#41450).
Patch by minoura makoto (user:minoura).


git-svn-id: https://svn.redmine.org/redmine/trunk@23148 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-10-20 04:46:37 +00:00
Go MAEDA
09451a1df0 Fix RuboCop offense Lint/SafeNavigationConsistency (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@23134 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-10-16 23:46:53 +00:00
Go MAEDA
52deba3abf Replace custom email normalization logic with Rails' normalizes method (#29208).
git-svn-id: https://svn.redmine.org/redmine/trunk@23064 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-09-20 01:58:08 +00:00
Go MAEDA
94d9a2337b Add "Author / Previous assignee" group to assignee dropdown in issue form (#16045).
Patch by Luka Lüdicke (user:dkd-luedicke), Mizuki ISHIKAWA (user:ishikawa999), and Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23059 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-09-15 06:31:30 +00:00
Go MAEDA
68121841b5 Fix NoMethodError in Issue#blocked? due to invalid issue_from_id in Issue#relations_from (#8539).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23048 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-09-10 00:55:32 +00:00
Go MAEDA
b7120cfe3a Remove unnecessary rubocop:disable directive for Style/EmptyLiteral (#39887).
RuboCop’s Style/EmptyLiteral false positive for `Hash.new([])` was resolved in RuboCop 1.66.1. This commit updates the RuboCop version to 1.66.1 and removes the now-unnecessary `rubocop:disable` directives.


git-svn-id: https://svn.redmine.org/redmine/trunk@23013 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-09-05 00:49:54 +00:00
Go MAEDA
d24d11a682 Fix RuboCop offense Style/StringChars (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@23009 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-09-01 06:05:39 +00:00
Go MAEDA
eee5d73ee1 Revert r23002 (#39887).
The change caused a test failure:

```
Failure:
UserTest#test_accessing_projects_by_role_with_no_projects_should_return_an_empty_array [test/unit/user_test.rb:1048]:
Expected: []
  Actual: nil
```


git-svn-id: https://svn.redmine.org/redmine/trunk@23006 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-09-01 01:33:00 +00:00
Go MAEDA
2190a4b417 Disable RuboCop Lint/InterpolationCheck for USER_FORMATS in app/models/user.rb (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@23005 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-09-01 01:02:38 +00:00
Go MAEDA
987a36281a Fix RuboCop offense Style/EmptyLiteral (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@23002 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-09-01 00:42:33 +00:00
Go MAEDA
2fe36c4128 Fix RuboCop offense Style/RedundantInterpolationUnfreeze (#39887).
Since interpolated strings are always unfrozen in Ruby 3.0 and later, the use of `+""` is now redundant.


git-svn-id: https://svn.redmine.org/redmine/trunk@23001 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-09-01 00:38:01 +00:00
Go MAEDA
8da72cb712 Fix precision issues in TimeEntry#hours calculation by returning Rational instead of Float (#40914).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23000 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-31 09:26:50 +00:00
Go MAEDA
fdd90bab2b Fix RuboCop offenses Style/NegatedIf and Style/NegatedWhile (#39887, #7770).
git-svn-id: https://svn.redmine.org/redmine/trunk@22987 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-25 08:44:33 +00:00
Go MAEDA
c2eb20e434 Fix RuboCop offense Style/ClassEqualityComparison (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@22978 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-21 13:45:13 +00:00
Go MAEDA
9cc3542fa1 Introduce active? method to Group via Principal model (#27510).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@22976 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-21 08:05:59 +00:00
Go MAEDA
643b4ebb08 Add filters for "Author's group" and "Author's role" to issues list (#7867).
Patch by Takenori TAKAKI (user:takenory).


git-svn-id: https://svn.redmine.org/redmine/trunk@22975 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-21 07:47:27 +00:00
Go MAEDA
93645a279e Use anonymous block forwarding introduced in Ruby 3.1 (#38585).
git-svn-id: https://svn.redmine.org/redmine/trunk@22973 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-21 00:46:15 +00:00
Go MAEDA
c069ea3a24 Use Array#intersect? introduced in Ruby 3.1 (#38585).
git-svn-id: https://svn.redmine.org/redmine/trunk@22972 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-20 23:40:58 +00:00
Go MAEDA
65597ec1cf Add filters for "User's group" and "User's role" to Spent time list (#41053).
Patch by Takenori TAKAKI (user:takenory).


git-svn-id: https://svn.redmine.org/redmine/trunk@22958 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-16 02:05:25 +00:00