summaryrefslogtreecommitdiffstats
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Adds method @initials@ to @Principal@ and return @nil@ by default (#42623).Marius Balteanu12 days1-0/+5
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@23888 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add OAuth2 provider capability using doorkeeper gem (#24808).Marius Balteanu2025-06-122-10/+35
| | | | | | Patch by Jens Krämer (user:jkraemer). git-svn-id: https://svn.redmine.org/redmine/trunk@23837 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Reverts r23835 due to wrong issue ID (#40856).Marius Balteanu2025-06-122-35/+10
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@23836 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add OAuth2 provider capability using doorkeeper gem (#40856).Marius Balteanu2025-06-112-10/+35
| | | | | | Patch by Jens Krämer (user:jkraemer). git-svn-id: https://svn.redmine.org/redmine/trunk@23835 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Replace nil check using ternary operator with safe navigation operator when ↵Go MAEDA2025-06-081-1/+1
| | | | | | | | | 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
* Fix RuboCop Lint/UselessOr (#41884).Go MAEDA2025-06-061-1/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@23822 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Show reaction counts and user names only for reactions visible to the ↵Go MAEDA2025-05-151-12/+7
| | | | | | | | | 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
* Adds Initials to the list of default gratavar options (#42623).Marius Balteanu2025-05-141-0/+17
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@23767 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Introduce reactions feature (so-called "like button") to issues, notes, ↵Go MAEDA2025-05-117-1/+85
| | | | | | | | | 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
* Optimize `Version::FixedIssuesExtension#issues_progress` by avoiding ↵Go MAEDA2025-05-061-1/+1
| | | | | | | | | | | 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
* Optimize watchers list rendering by eager loading email addresses (#42589).Go MAEDA2025-04-272-1/+2
| | | | | | | Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23722 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Joining both atom_token and api_token on the User model causes an error due ↵Go MAEDA2025-04-251-2/+2
| | | | | | | | | 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
* Fix Rubocop Style/ArgumentsForwarding (#42496).Go MAEDA2025-04-2116-40/+40
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@23698 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds interval ratio setting to progressbar custom field (#42335).Go MAEDA2025-04-191-1/+2
| | | | | | | 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
* NoMethodError when creating a user with an invalid email address and domain ↵Go MAEDA2025-04-181-1/+5
| | | | | | | | | 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
* Fix RuboCop Style/RedundantCondition (#41884).Go MAEDA2025-04-111-5/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@23627 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix RuboCop Lint/SharedMutableDefault (#41884).Go MAEDA2025-04-111-2/+2
| | | | | | | 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
* Fix slow loading of global spent time list in MySQL (#40728).Go MAEDA2025-04-081-6/+13
| | | | | | | | | 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
* Improve performance of `TimeEntry#assignable_users` by reducing SQL queries ↵Go MAEDA2025-04-021-2/+5
| | | | | | | | | (#35927). Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23595 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixes wrong condition added in r23586 (#13596).Marius Balteanu2025-03-301-1/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@23589 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixes rubocop offense "[Correctable] Lint/SafeNavigationConsistency: Use . ↵Marius Balteanu2025-03-301-1/+1
| | | | | | instead of unnecessary &.." (#13596). git-svn-id: https://svn.redmine.org/redmine/trunk@23588 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add administration setting to allow time logging on closed issues. By ↵Marius Balteanu2025-03-302-0/+8
| | | | | | default, the setting is enabled (#13596). git-svn-id: https://svn.redmine.org/redmine/trunk@23586 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds missing files (#42352).Marius Balteanu2025-03-101-0/+63
| | | | | | Patch by Holger Just (user:hjust). git-svn-id: https://svn.redmine.org/redmine/trunk@23532 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Extract project query for admins to a separate ProjectAdminQuery model (#42352).Marius Balteanu2025-03-092-40/+10
| | | | | | Patch by Holger Just (user:hjust). git-svn-id: https://svn.redmine.org/redmine/trunk@23531 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Ensure that a UserQuery can only be viewed or edited by admins (#42352).Marius Balteanu2025-03-091-0/+17
| | | | | | Patch by Holger Just (user:hjust). git-svn-id: https://svn.redmine.org/redmine/trunk@23530 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Allow query class to select layout for QueriesController (#42352).Marius Balteanu2025-03-093-0/+7
| | | | | | Patch by Holger Just (user:hjust). git-svn-id: https://svn.redmine.org/redmine/trunk@23529 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix RuboCop Style/SuperArguments (#41884).Go MAEDA2025-02-061-1/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@23491 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Reduce SQL queries triggered by `empty?` and `one?` in ↵Go MAEDA2025-01-301-1/+1
| | | | | | `TimeEntryActivity.default_activity_id` by preloading `available_activities` (#42150). git-svn-id: https://svn.redmine.org/redmine/trunk@23478 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Optimize TimeEntryActivity#default_activity_id method by introducing early ↵Go MAEDA2025-01-291-21/+21
| | | | | | | | | 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
* Refactor `Member#role_ids=` method for improved clarity and effficiency in ↵Go MAEDA2025-01-211-4/+2
| | | | | | | | | 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
* Optimize `Version#wiki_page` method (#42121).Go MAEDA2025-01-201-4/+1
| | | | | | | | | 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
* Member roles are incorrectly added when a user's memberships are updated ↵Go MAEDA2025-01-191-1/+1
| | | | | | | | | (#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
* Preload tracker when retrieving journal events to improve Activity view ↵Go MAEDA2025-01-181-1/+1
| | | | | | | | | performance (#42077). Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23447 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Optimize `journalized` method to use preloaded Issue association for better ↵Go MAEDA2025-01-181-0/+9
| | | | | | | | | 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
* Fix NoMethodError in IssuePriority#high and #low when no default or active ↵Go MAEDA2025-01-051-2/+6
| | | | | | | | | priorities exist (#42066). Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23431 e93f8b46-1217-0410-a6f0-8f06a7374b81
* FrozenError when using SQLite3 gem version 2.0.0 or later (#41860).Go MAEDA2024-11-251-2/+1
| | | | | | | Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23308 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixes project query scope that does not take into account limit and offset ↵Marius Balteanu2024-11-231-1/+3
| | | | | | options (#41791). git-svn-id: https://svn.redmine.org/redmine/trunk@23300 e93f8b46-1217-0410-a6f0-8f06a7374b81
* @ProjectQuery#results_scope@ should return @Project::ActiveRecord_Relation@ ↵Marius Balteanu2024-11-031-2/+1
| | | | | | | | | | 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
* Fix: "Import issues" and "Import time entries" pages are visible to users ↵Go MAEDA2024-11-032-2/+2
| | | | | | | | | 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
* Fix: `updated_by_id` in Journal points to a deleted user instead of an ↵Go MAEDA2024-10-291-0/+1
| | | | | | | | | anonymous user (#41572). Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23169 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix CSV import file encoding auto-detection failure with multibyte ↵Go MAEDA2024-10-201-1/+15
| | | | | | | | | characters (#41464). Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23150 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Include attachment filename in "File added" email notification subject (#41450).Go MAEDA2024-10-201-1/+4
| | | | | | | Patch by minoura makoto (user:minoura). git-svn-id: https://svn.redmine.org/redmine/trunk@23148 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix RuboCop offense Lint/SafeNavigationConsistency (#39887).Go MAEDA2024-10-162-2/+2
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@23134 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Replace custom email normalization logic with Rails' `normalizes` method ↵Go MAEDA2024-09-201-9/+7
| | | | | | (#29208). git-svn-id: https://svn.redmine.org/redmine/trunk@23064 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add "Author / Previous assignee" group to assignee dropdown in issue form ↵Go MAEDA2024-09-151-0/+12
| | | | | | | | | (#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
* Fix NoMethodError in Issue#blocked? due to invalid issue_from_id in ↵Go MAEDA2024-09-101-1/+1
| | | | | | | | | 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
* Remove unnecessary rubocop:disable directive for Style/EmptyLiteral (#39887).Go MAEDA2024-09-051-2/+2
| | | | | | | 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
* Fix RuboCop offense Style/StringChars (#39887).Go MAEDA2024-09-011-1/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@23009 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Revert r23002 (#39887).Go MAEDA2024-09-011-2/+2
| | | | | | | | | | | | | | 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
* Disable RuboCop Lint/InterpolationCheck for USER_FORMATS in ↵Go MAEDA2024-09-011-0/+2
| | | | | | app/models/user.rb (#39887). git-svn-id: https://svn.redmine.org/redmine/trunk@23005 e93f8b46-1217-0410-a6f0-8f06a7374b81