Redmine - Feature #29286
Add default spent time activity per role
2018-07-27 01:04 - Marius B

LTEANU

ステータス:

Closed

開始日:

優先度:

Normal

期日:担当者:

Go MAEDA

進捗率:0%

カテゴリ:

Time tracking

予定工数:0.00時間対象バージョン:5.1.0

Resolution:

Fixed

説明
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 canhave different roles per projects. Maybe in one project I'm a developer and I want to have the "Development" activity as default, andin 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.
関連するチケット:
関連している Redmine - Feature #938: Add default Activity value...

New

2008-03-27

関連している Redmine - Feature #7080: Alternate default activit...

New

2010-12-08

関連している Redmine - Feature #14983: Default Activity per Iss...

New

関連している Redmine - Feature #573: Spend time and Activity en...

New

関係しているリビジョン
リビジョン 21763 - 2022-08-09 04:50 - Go MAEDA
Add default spent time activity per role (#29286).
Patch by Marius BALTEANU and Mizuki ISHIKAWA.
リビジョン 21764 - 2022-08-09 04:56 - Go MAEDA
Update locales (#29286).

履歴#1 - 2018-07-27 01:05 - Marius B

LTEANU- 関連している Feature #938: Add default Activity value per user を追加#2 - 2018-07-27 06:46 - Bernhard Rohloff+1This could really save time for many people and makes time tracking less tedious.
#3 - 2018-07-28 10:27 - 彥丞 陳+1#4 - 2018-08-07 06:33 - Marius B

LTEANU- 関連している Feature #7080: Alternate default activity in time logging を追加#5 - 2018-08-11 15:12 - Marius B

LTEANU- ファイル 0001-Option-to-set-default-time-entry-activity-per-role.patch を追加- ファイル default̲role̲time̲entry.png を追加- 担当者 を削除 (Marius BLTEANU)

Attached is the patch that adds the option to define a default time entry activity for each role.

2024-10-11

1/2

default̲role̲time̲entry.png
Any feedback is welcome.
#6 - 2018-09-09 02:45 - Go MAEDA- 対象バージョン を Candidate for next major release にセット
#7 - 2018-11-25 08:36 - ciel ciel
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 needthis feature and thank you#8 - 2018-12-05 20:44 - Gerardo Schild
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!
#9 - 2022-07-22 03:55 - Mizuki ISHIKAWA- ファイル 0001-Option-to-set-default-time-entry-activity-per-role-r21737.patch を追加
I think this feature very useful.
I have made changes so that I can apply the patch to the latest code.
Main Changes:
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 inhttps://github.com/redmine/redmine/commit/2fdbcd35dd8cc2f6b98340825a57afd24ff89670#diff-d94d27c8c3a5137bab78b034894d9fe
ba4abaac9144c3177daaa4bc1eba6f02aR95 no longer sets the initial user, so the role for selecting the default activity is now taken fromUser.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.
#10 - 2022-08-02 04:19 - Go MAEDA- 対象バージョン を Candidate for next major release から 5.1.0 に変更
Setting the target version to 5.1.0.
#11 - 2022-08-09 04:51 - Go MAEDA- ステータス を New から Closed に変更- 担当者 を Go MAEDA にセット
- Resolution を Fixed にセット
Committed the patch. Thank you all for your contribution.
#12 - 2023-04-16 16:21 - Go MAEDA- 関連している Feature #14983: Default Activity per Issue Tracker を追加#13 - 2023-05-06 01:06 - Go MAEDA- 関連している Feature #573: Spend time and Activity enhancement を追加

ファイル
0001-Option-to-set-default-time-entry-activity-per-role.patch

9.76 KB

2018-08-11

Marius B

LTEANUdefault̲role̲time̲entry.png

124 KB2018-08-11

Marius B

LTEANU

0001-Option-to-set-default-time-entry-activity-per-role-r21737.patch 11.9 KB

2022-07-22

Mizuki ISHIKAWA

2024-10-11

2/2