Feature #29286
closedAdd default spent time activity per role
0%
Description
Currently, you can set a default spent time activity for all users, regardless their role.
I find it more useful if we add a default activity for each role (and not for each user how is requested in #938) because an user can have different roles per projects. Maybe in one project I'm a developer and I want to have the "Development" activity as default, and in another project I've the "Manager" role and I want to have the "Project Management" activity as default.
If a role doesn't have a default activity, the global should be set as default if exists, otherwise blank.
Any feedback is welcome.
Files
Related issues
Updated by Marius BĂLTEANU over 6 years ago
- Related to Feature #938: Add default Activity value per user added
Updated by Bernhard Rohloff over 6 years ago
+1
This could really save time for many people and makes time tracking less tedious.
Updated by Marius BĂLTEANU about 6 years ago
- Related to Feature #7080: Alternate default activity in time logging added
Updated by Marius BĂLTEANU about 6 years ago
- File 0001-Option-to-set-default-time-entry-activity-per-role.patch 0001-Option-to-set-default-time-entry-activity-per-role.patch added
- File default_role_time_entry.png default_role_time_entry.png added
- Assignee deleted (
Marius BĂLTEANU)
Attached is the patch that adds the option to define a default time entry activity for each role.
Any feedback is welcome.
Updated by Go MAEDA about 6 years ago
- Target version set to Candidate for next major release
Updated by ciel ciel almost 6 years ago
I am using redmine 3.4.6. on bitnami, I apply the patch in the directory htdoc but once I redemare the service, access to the menu role hangs, I need this feature and thank you
Updated by Gerardo Schild almost 6 years ago
I am using redmine 3.4.6 on bitnami, although the patch did not work, I applied the changes manually and I had the following error, which should be corrected for the patch
\app\models\time_entry_activity.rb
I get the error of: undefined function punk which solves it with .sort.map(&:default_time_entry_activity_id)
Thank you!
Updated by Mizuki ISHIKAWA over 2 years ago
- File 0001-Option-to-set-default-time-entry-activity-per-role-r21737.patch 0001-Option-to-set-default-time-entry-activity-per-role-r21737.patch added
I think this feature very useful.
I have made changes so that I can apply the patch to the latest code.
- Delete TimeEntryActivity.allowed_activities and replace with existing TimeEntryActivity.available_activities
- Integrate the code for selecting the existing default activity( https://github.com/redmine/redmine/blob/04e5ae033bf78d7cfd55dd1b905df79c2a913f83/app/models/time_entry.rb#L110-L114 ) into TimeEntryActivity.default_activity_id
- Add test for TimeEntryActivity.default_activity_id
- The change in https://github.com/redmine/redmine/commit/2fdbcd35dd8cc2f6b98340825a57afd24ff89670#diff-d94d27c8c3a5137bab78b034894d9feba4abaac9144c3177daaa4bc1eba6f02aR95 no longer sets the initial user, so the role for selecting the default activity is now taken from User.current (in the patch, it was self.user, so it was no longer working).
- Member.find_or_new method is gone, replaced with Member.find_or_initialize_by.
Updated by Go MAEDA about 2 years ago
- Target version changed from Candidate for next major release to 5.1.0
Setting the target version to 5.1.0.
Updated by Go MAEDA about 2 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch. Thank you all for your contribution.
Updated by Go MAEDA over 1 year ago
- Related to Feature #14983: Default Activity per Issue Tracker added
Updated by Go MAEDA over 1 year ago
- Related to Feature #573: Spend time and Activity enhancement added