Redmine - Feature #4077
Custom fields and overrides on Enumerations
2009-10-21 20:39 - Eric Davis

ステータス:

Closed

開始日:

優先度:

High

期日:担当者:

Eric Davis

進捗率:

100%

予定工数:

0.00時間カテゴリ:
対象バージョン:2009-10-21

0.9.0

Resolution:
説明I'm going to be adding a bunch of changes to Redmine this week in order to make Enumerations more flexible and customizable.
My specific goal is to have the Time Entry Activities flexible and when combined with a soon to be released plugin, allow Redmine
to track things like Billable and Non Billable time automatically (optional).
The short list of changes include:
Allowing custom fields on Enumerations. - Example: Is this activity billable?
Allow Time Entry Activities to be marked active or inactive. Inactive ones will only be listed in admin pages.
Allow each project to override the Time Entry Activities' custom data - Example: ActivityA is billable except on ProjectB where
it is non-billable
Allow each project to override if each Time Entry Activity is active or inactive. This will let a project Manager turn off
activities that aren't needed on a project.
Allow the Time Report to use the Custom Data fields as filters
All of this code has been developed and tested already and has running in production for over 4 months now. I'm just going to
extract it from a running system so everyone can use it. There might be some bugs from the merge and I'm sure we will need toiterate over it a few times to make it more robust but I'd rather get this out there and get feedback on it sooner than later.
関連するチケット:
関連している Redmine - Defect #4084: Cannot disable activity in...

Closed2009-10-22

関連している Redmine - Defect #6564: Remove IssuePriorityCustom...

Closed2010-10-04

関係しているリビジョン
リビジョン 2945 - 2009-10-22 00:34 - Eric Davis
Enumerations can now have custom fields defined on them. #4077
リビジョン 2946 - 2009-10-22 00:34 - Eric Davis
Added an active field track if an Enumeration is active on the frontend view.
Changed TimelogHelper#activity̲collection̲for̲select̲options to only use
active TimeEntryActivities.
Changed TimelogHelper#activity̲collection̲for̲select̲options to return a blank
option if the time̲entry's current activity is inactive.
#4077

リビジョン 2947 - 2009-10-22 00:34 - Eric Davis
Added project specific Enumeration overrides.
These will be used to track if Enumeration's custom data or active stateis overridden on a project. An overridden Enumeration is one that is associatedwith a parent Enumeration.
#4077
リビジョン 2948 - 2009-10-22 00:34 - Eric Davis
Changed the Timelogs to use both the Systemwide and Project specific TimeEntryActivities

2024-11-10

1/3

Added Project#activities to return all the Systemwide and Project specificactivities, excluding Systemwide ones that are overridden.
Added some tests for TimelogHelper.
#4077

リビジョン 2949 - 2009-10-22 00:34 - Eric Davis
Added a Activities tab to Project Settings
Changed Project#activities to allow getting inactive Activities also: * Changed the Enumeration#all named̲scope to exclude project specificActivities * Changed the Project has̲many time̲entry̲activities to include all by default
and provided an #active method to filter them to active ones only * Split Project#activities to two methods and gave it a parameter that isused
to determine if inactive activities are included (default is no)
Added a reset button to delete all project specific activities.
Added ProjectsController#reset̲activities to remove the project
specific activities
Added a HTTP DELETE route for reset̲activities
Changed the permissions for managing project activities to have access to theProjectsController#reset̲activities action
Added a way to bulk save Project specific Activities in ProjectsController * #save̲activities will save all the changed activities, including
update theexisting records * Added helper methods to the controller which will be refactored later * Allow the same TimeEntryActivity names on
different projects#4077

リビジョン 2950 - 2009-10-22 00:34 - Eric Davis
When a specific TimeEntryActivity are change, associated TimeEntries will be
re-assigned to the correct record.
Renamed build to create since the methods now create objects.
Removed call to Project#save that isn't needed since objects are saved directly now.
Wrapped the activity creation and updates in a SQL transaction so TimeEntries
will remain in a consistent state if there is an error.
When a Project's TimeEntryActivities are destroyed, they are now
reassigned to the parent TimeEntryActivity.
#4077

リビジョン 2951 - 2009-10-22 00:34 - Eric Davis
Added all list and boolean custom data fields to the Time Report. #4077
リビジョン 2952 - 2009-10-22 00:35 - Eric Davis
Fixed some merge bugs. #4077

履歴#1 - 2009-10-22 00:42 - Eric Davis- ステータス を 7 から Closed に変更- 進捗率 を 0 から 100 に変更
This went a lot faster than I thought. I was able to extract and merge all of the new features today (thanks git!). I've attached some screenshotswith purple highlights to show what parts of Redmine's UI have changed. If there are any bugs or change requests, please open a new issue andassign it to me.
I combined the changes into 9 separate commits so they are easier to review. Committed in: r2944, r2945, r2946, r2947, r2948, r2949, r2950,r2951, r2952#2 - 2009-10-22 01:01 - Eric Davis- ファイル editing-a-time-entry-activity.png を追加- ファイル entering-a-time-entry.png を追加

2024-11-10

2/3

- ファイル enumeration-custom-fields.png を追加- ファイル enumeration-list.png を追加- ファイル new-project-settings-tab.png を追加
I guess the screenshots would be easier to see if they were attached.

ファイル
editing-a-time-entry-activity.png

24.1 KB

2009-10-21

Eric Davis

entering-a-time-entry.png

21.7 KB

2009-10-21

Eric Davis

enumeration-custom-fields.png

27.7 KB

2009-10-21

Eric Davis

enumeration-list.png

45 KB

2009-10-21

Eric Davis

new-project-settings-tab.png

28 KB

2009-10-21

Eric Davis2024-11-10

3/3