Commit Graph

100 Commits

Author SHA1 Message Date
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
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
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
Marius Balteanu
38d950df55 Remove current year from source file copyright headers and update year in footer to 2024 (#40043).
git-svn-id: https://svn.redmine.org/redmine/trunk@22746 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-02-26 22:55:54 +00:00
Marius Balteanu
13aeb797cf Use ApplicationRecord instead of ActiveRecord::Base (#38975).
Patch by Minoru Maeda (@maeda-m).

git-svn-id: https://svn.redmine.org/redmine/trunk@22619 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-01-23 11:52:38 +00:00
Go MAEDA
3928d82ee1 Avoid exception during validation if the spent_on date of a time entry was removed (#39079).
Patch by Holger Just.


git-svn-id: https://svn.redmine.org/redmine/trunk@22311 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-09-20 04:43:20 +00:00
Go MAEDA
92bd67c279 Update copyright year to 2023 (#38141).
git-svn-id: https://svn.redmine.org/redmine/trunk@22013 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-01-01 06:19:35 +00:00
Go MAEDA
38f7a06405 Add default spent time activity per role (#29286).
Patch by Marius BALTEANU and Mizuki ISHIKAWA.


git-svn-id: https://svn.redmine.org/redmine/trunk@21763 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-08-09 02:50:11 +00:00
Go MAEDA
6badcf374b Make the only enabled activity in a project the default one for time entry (#10314).
Patch by Mizuki ISHIKAWA.


git-svn-id: https://svn.redmine.org/redmine/trunk@21709 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-07-17 00:16:31 +00:00
Marius Balteanu
bfcb1b0054 Fix time entry activity is not set as default when the default activity exists as project specific activity (#33914).
Patch by Mizuki ISHIKAWA.


git-svn-id: https://svn.redmine.org/redmine/trunk@21668 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-06-20 15:26:47 +00:00
Marius Balteanu
b2bf7c6d8c Respect field visibility when filtering/sorting by associated issue fields (#37255).
Patch by Holger Just.


git-svn-id: https://svn.redmine.org/redmine/trunk@21646 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-06-16 21:44:46 +00:00
Go MAEDA
3686b77eb6 Update copyright year in source files to 2022 (#36379).
git-svn-id: http://svn.redmine.org/redmine/trunk@21342 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-01-02 05:29:10 +00:00
Marius Balteanu
3ebe6a8b0a When updating an issue, allow adding time entry on an issue that was visible for the previous assignee (#34856).
git-svn-id: http://svn.redmine.org/redmine/trunk@21081 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-07-26 20:20:41 +00:00
Go MAEDA
3e36b5c452 Update copyright year in source files to 2021 (#33069).
git-svn-id: http://svn.redmine.org/redmine/trunk@20846 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-03-25 06:58:56 +00:00
Go MAEDA
1accf2a072 Delete spent time custom field values not visible by the user after assignment (#33550).
Patch by  Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@20802 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-03-15 23:36:27 +00:00
Toshi MARUYAMA
7e3a61ef52 remove spaces inside {} of app/models/time_entry.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20407 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-11-17 12:41:03 +00:00
Toshi MARUYAMA
cf30b49e0e remove spaces inside {} of app/models/time_entry.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20397 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-11-16 12:22:32 +00:00
Toshi MARUYAMA
050b05689f use "do end" instead of {} at ActiveRecord scope lambda of app/models/time_entry.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20329 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-11-10 11:10:32 +00:00
Toshi MARUYAMA
9a0a45967b shorten long line of app/models/time_entry.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20181 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-10-24 14:39:47 +00:00
Go MAEDA
e48ff48820 Evaluate acts_as_activity_provider's scope lazily (#33664).
Patch by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@20148 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-10-17 02:02:50 +00:00
Go MAEDA
62c7da1b3f CodeCleanup: Fix a RuboCop offense Layout/LeadingCommentSpace introduced in r19677.
git-svn-id: http://svn.redmine.org/redmine/trunk@19687 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-04-11 07:53:51 +00:00
Jean-Philippe Lang
31c8e71d8e Set time entry author in controller (#32774).
git-svn-id: http://svn.redmine.org/redmine/trunk@19677 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-04-05 19:24:32 +00:00
Jean-Philippe Lang
99df2c5c58 Creating time tracking entry for other user through rest API fails with 403 (#32774).
git-svn-id: http://svn.redmine.org/redmine/trunk@19676 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-04-05 18:39:05 +00:00
Jean-Philippe Lang
e91dbcb5a7 Editing a time entry for a locked user changes the user to the current user (#32973).
Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@19651 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-04-05 08:21:25 +00:00
Go MAEDA
907e0173e4 Update copyright year in source files to 2020 (#33069).
git-svn-id: http://svn.redmine.org/redmine/trunk@19553 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-03-03 00:24:10 +00:00
Toshi MARUYAMA
fb84731bcd cleanup: rubocop: fix Layout/BlockAlignment in app/models/time_entry.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19028 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-11-09 16:05:07 +00:00
Toshi MARUYAMA
4810d5f5c4 cleanup: rubocop: fix Layout/AlignArguments in app/models/time_entry.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18948 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-11-08 06:26:43 +00:00
Toshi MARUYAMA
b6604ec751 code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/models/time_entry.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18834 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-10-22 15:54:37 +00:00
Go MAEDA
3c91a3d5b2 Per role visibility settings for spent time custom fields (#31859).
Patch by Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@18358 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-08-09 09:31:16 +00:00
Go MAEDA
4082069c75 Update copyright year.
git-svn-id: http://svn.redmine.org/redmine/trunk@18198 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-25 07:36:06 +00:00
Go MAEDA
07b3087fda Enable frozen_string_literal for some files under app and lib directory (#26561).
git-svn-id: http://svn.redmine.org/redmine/trunk@17977 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-16 09:37:35 +00:00
Go MAEDA
5861160ffc Add "frozen_string_literal: false" for all files (#26561).
This will be changed to true in the future.


git-svn-id: http://svn.redmine.org/redmine/trunk@17947 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-15 01:32:57 +00:00
Jean-Philippe Lang
2fdbcd35dd Adds a permission to log time for another user (#3848).
Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@17755 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-12-16 16:28:22 +00:00
Go MAEDA
9f6277e07c Setting to restrict spent times on future dates (#3322).
Patch by Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@17719 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-12-11 03:55:58 +00:00
Jean-Philippe Lang
d74f0bfd5c Merged rails-5.1 branch (#23630).
git-svn-id: http://svn.redmine.org/redmine/trunk@16859 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-07-23 11:26:04 +00:00
Jean-Philippe Lang
7bd8280a83 Adds settings for time entry hours validation (#24005).
git-svn-id: http://svn.redmine.org/redmine/trunk@16832 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-07-19 14:13:10 +00:00
Jean-Philippe Lang
7fd04e1f8d Update copyright.
git-svn-id: http://svn.redmine.org/redmine/trunk@16685 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-06-25 08:40:31 +00:00
Jean-Philippe Lang
70b0bc5168 Adds a scope to left join the issue.
git-svn-id: http://svn.redmine.org/redmine/trunk@16481 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-04 17:54:39 +00:00
Jean-Philippe Lang
868f83fe35 Only show issue details in time entry activity events if the issue is visible (#23803).
Patch by Holger Just.

git-svn-id: http://svn.redmine.org/redmine/trunk@16284 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-01-29 07:54:37 +00:00
Jean-Philippe Lang
04eefdc809 Adds settings to make the issue and/or comment fields mandatory for time logs (#24577).
Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@16176 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-01-12 23:09:18 +00:00
Jean-Philippe Lang
cda9c63d9c Updates copyright for 2016.
git-svn-id: http://svn.redmine.org/redmine/trunk@15238 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-03-13 10:30:10 +00:00
Jean-Philippe Lang
945a091c94 Don't let users log time on issues they cannot see in their projects (#21150).
git-svn-id: http://svn.redmine.org/redmine/trunk@14796 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-11-04 18:40:15 +00:00
Jean-Philippe Lang
5882629e26 Raises time entries comments limit to 1024 (#19885).
git-svn-id: http://svn.redmine.org/redmine/trunk@14621 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-09-21 21:00:06 +00:00
Jean-Philippe Lang
62bed8b93f Validates that activity belongs to project activities (#19656).
git-svn-id: http://svn.redmine.org/redmine/trunk@14288 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-05-30 08:46:41 +00:00
Jean-Philippe Lang
6659aad3ef Adds a role setting that viewing all or own time entries (#8929).
git-svn-id: http://svn.redmine.org/redmine/trunk@14275 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-05-30 07:40:57 +00:00
Jean-Philippe Lang
3d1c40cd52 Fixed validation when logging time on issue (#19464).
git-svn-id: http://svn.redmine.org/redmine/trunk@14162 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-04-12 07:37:18 +00:00
Jean-Philippe Lang
4bbd3d81fd TimeEntry acts_as_activity_provider scope should joins(:project) (#18818).
Patch by Ondřej Ezr.

git-svn-id: http://svn.redmine.org/redmine/trunk@13971 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-02-07 09:10:57 +00:00
Jean-Philippe Lang
000124f44f Copyright update.
git-svn-id: http://svn.redmine.org/redmine/trunk@13872 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-01-11 09:09:50 +00:00
Jean-Philippe Lang
8992dc9f93 Removed dead code, Rails4 handles that in its attribute writer.
git-svn-id: http://svn.redmine.org/redmine/trunk@13716 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-05 12:37:00 +00:00