Commit Graph

3335 Commits

Author SHA1 Message Date
Go MAEDA
157986c778 Fix RuboCop Rails/OrderArguments (#43438).
git-svn-id: https://svn.redmine.org/redmine/trunk@24125 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-11-05 07:41:46 +00:00
Go MAEDA
73b81d4634 Fix RuboCop Layout/BeginEndAlignment (#43437).
git-svn-id: https://svn.redmine.org/redmine/trunk@24122 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-11-05 07:00:59 +00:00
Go MAEDA
48a0e9ade2 Fix RuboCop Style/RedundantRegexpEscape (#43437).
git-svn-id: https://svn.redmine.org/redmine/trunk@24120 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-11-05 06:56:50 +00:00
Go MAEDA
3a3194bbd5 Add copyright headers to webhook-related files (#29664).
git-svn-id: https://svn.redmine.org/redmine/trunk@24113 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-11-03 09:28:35 +00:00
Marius Balteanu
124ffa3e8b Removes to do and keep the original option (#29664).
git-svn-id: https://svn.redmine.org/redmine/trunk@24076 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-10-27 21:03:28 +00:00
Marius Balteanu
31ce3c99c2 Allow administrators to disable webhooks from settings (#29664).
Patch by Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@24073 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-10-27 20:35:17 +00:00
Go MAEDA
36e083a7a6 Fix RuboCop offense: Style/CommentAnnotation (#29664).
Patch by Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@24038 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-10-08 04:53:12 +00:00
Marius Balteanu
c0ee562c9f Temporary disable Rails/HasAndBelongsToMany offense,
git-svn-id: https://svn.redmine.org/redmine/trunk@24037 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-10-07 10:58:02 +00:00
Marius Balteanu
a524967fbc Adds the :use_webhooks permission in order to allow users to use webhooks only in projects where they have this permission. This is checked when a hook is saved, and before a hook runs (#29664).
Patch by Jens Krämer (user:jkraemer).



git-svn-id: https://svn.redmine.org/redmine/trunk@24035 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-10-07 06:51:33 +00:00
Marius Balteanu
d90d192f48 Introduces issue webhooks (#29664):
* users can set up hooks for issue creation, update and deletion events, for any number of projects
* hooks run in the context of the creating user, and only if the object in question is visible to that user
* the actual HTTP call is done in ActiveJob
* webhook calls are optionally signed the same way GitHub does

Patch by Jens Krämer (user:jkraemer).



git-svn-id: https://svn.redmine.org/redmine/trunk@24034 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-10-07 06:49:14 +00:00
Go MAEDA
be78fbb34c Replace multiple projects.status <> ... conditions with projects.status IN (...) for optimizer-friendliness in Project.allowed_to_condition (#43214).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23979 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-09-17 01:02:16 +00:00
Marius Balteanu
2d44c48657 Makes 'auto watch issues' default user settings configurable (#42880).
Patch by Jan Catrysse (user:jcatrysse).

git-svn-id: https://svn.redmine.org/redmine/trunk@23956 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-09-07 08:02:04 +00:00
Marius Balteanu
bd034751bf Clear non-editable custom fields when creating an issue (43161).
This ensures that only editable custom fields are saved on a new issue
when copying an existing one. 

Patch by Holger Just (user:hjust).

git-svn-id: https://svn.redmine.org/redmine/trunk@23945 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-09-07 06:18:55 +00:00
Marius Balteanu
bffc7cce58 Removes undesired change introduced in r23903 (#29824).
git-svn-id: https://svn.redmine.org/redmine/trunk@23904 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-08-07 20:26:30 +00:00
Marius Balteanu
458072ab7d When the Gravatar service is disabled, display the user's initials as a fallback avatar. This provides a consistent user interface than the generic icon (#29824).
git-svn-id: https://svn.redmine.org/redmine/trunk@23903 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-08-07 19:07:33 +00:00
Marius Balteanu
ae3cb747bb Adds method @initials@ to @Principal@ and return @nil@ by default (#42623).
git-svn-id: https://svn.redmine.org/redmine/trunk@23888 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-07-15 05:20:23 +00:00
Marius Balteanu
2d3b3b939e Add OAuth2 provider capability using doorkeeper gem (#24808).
Patch by Jens Krämer (user:jkraemer).

git-svn-id: https://svn.redmine.org/redmine/trunk@23837 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-06-12 07:09:03 +00:00
Marius Balteanu
e56d84b632 Reverts r23835 due to wrong issue ID (#40856).
git-svn-id: https://svn.redmine.org/redmine/trunk@23836 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-06-12 07:05:01 +00:00
Marius Balteanu
ebdd1a40f4 Add OAuth2 provider capability using doorkeeper gem (#40856).
Patch by Jens Krämer (user:jkraemer).

git-svn-id: https://svn.redmine.org/redmine/trunk@23835 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-06-11 20:30:44 +00:00
Go MAEDA
40ab48325e Replace nil check using ternary operator with safe navigation operator when accessing hashes (#41884).
Using the ternary operator for nil checking caused a runtime error in the Style/SafeNavigation cop during `rubocop --regenerate-todo` with RuboCop 1.76.0. Replacing it with the safe navigation operator avoids the error.


git-svn-id: https://svn.redmine.org/redmine/trunk@23824 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-06-08 02:12:29 +00:00
Go MAEDA
ddd7beecf1 Fix RuboCop Lint/UselessOr (#41884).
git-svn-id: https://svn.redmine.org/redmine/trunk@23822 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-06-06 09:13:25 +00:00
Go MAEDA
e7703a0170 Show reaction counts and user names only for reactions visible to the logged-in user (#42630).
Patch by Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@23768 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-05-15 05:01:54 +00:00
Marius Balteanu
66e2d1a9a9 Adds Initials to the list of default gratavar options (#42623).
git-svn-id: https://svn.redmine.org/redmine/trunk@23767 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-05-14 19:41:04 +00:00
Go MAEDA
403c10091f Introduce reactions feature (so-called "like button") to issues, notes, news, and forums (#42630).
Patch by Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@23755 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-05-11 07:59:16 +00:00
Go MAEDA
7e4acb6b23 Optimize Version::FixedIssuesExtension#issues_progress by avoiding repeated Issue#closed? calls (#42673).
Since the issues are already filtered by open or closed status using the `open` argument through the `self.open(open)` scope, the call to expensive method `Issue#closed?` can be safely replaced with a check of the `open` argument.

Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23747 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-05-06 06:45:36 +00:00
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