summaryrefslogtreecommitdiffstats
path: root/app/models/time_entry.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixed that custom_fields property is ignored for time entries in REST API ↵Jean-Philippe Lang2012-06-091-1/+1
| | | | | | (#11112). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9783 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Copyright update.Jean-Philippe Lang2012-05-051-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9636 e93f8b46-1217-0410-a6f0-8f06a7374b81
* model: replace Rails2 "named_scope" to Rails3 "scope"Toshi MARUYAMA2012-04-261-4/+4
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9537 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Prevent mass-assignment when adding/updating a time entry (#10390).Jean-Philippe Lang2012-03-061-0/+3
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9136 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Round hours when reading TimeEntry attribute.Jean-Philippe Lang2012-02-241-0/+9
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8980 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Removed after_initialize methods.Jean-Philippe Lang2011-12-181-1/+2
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8288 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Removed unnecessary calculations in time entries index.Jean-Philippe Lang2011-12-041-20/+12
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8085 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds named scopes for time entries index.Jean-Philippe Lang2011-12-041-1/+12
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8084 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Removed deprecated methods.Jean-Philippe Lang2011-11-291-8/+0
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7977 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Rails3: model: replace deprecated 'before_validation' method at TimeEntry modelToshi MARUYAMA2011-09-221-1/+2
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7453 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Rails3: model: replace deprecated 'validate' method at TimeEntry modelToshi MARUYAMA2011-09-221-1/+2
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7448 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove trailing white-spaces from time entry model source.Toshi MARUYAMA2011-05-171-12/+12
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5820 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Makes visible scopes accept projects option and deprecate Project.visible_by.Jean-Philippe Lang2011-04-051-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5324 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Replaces TimeEntry.visible_by with a visible scope.Jean-Philippe Lang2011-03-161-2/+9
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5149 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixes TimeEntry#spent_on= so that datetimes don't get stored in SQLite3 (#7258).Jean-Philippe Lang2011-01-141-0/+3
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4708 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: timelog link in the activity broken by recent refactoring (#6702).Jean-Philippe Lang2010-10-221-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4277 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Change the TimelogController's to/from dates based on the project time entriesEric Davis2010-09-141-4/+12
| | | | | | | | Instead of looking for the earliest and latest time entry system wide for the dates in the form, now TimelogController will only look at the time entries for the current project (and parent/sub projects). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4087 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Refactor: move method to Model.Eric Davis2010-09-141-0/+8
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4086 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Force TimeEntry#hours default to nil (#3075, #4449).Jean-Philippe Lang2009-12-231-0/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3232 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds spent time to the activity view (#3809).Jean-Philippe Lang2009-09-121-3/+7
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2877 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Changed Enumerations to use a Single Table InheritanceEric Davis2009-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * Added migrations to change Enumerations to an STI relationship * Added TimeEntryActivity model (STI) * Added DocumentCategory model (STI) * Added IssuePriority model (STI) * Added Enumeration#get_subclasses to get a list of the subclasses of Enumeration * Changed Enumeration to use the STI type field instead of the opt field * Changed Enumeration#opt to return the old opt values but with a deprecation warning. * Removed Enumeration::OPTIONS * Removed the dynamic named_scopes in favor of specific named_scopes. Kept for compatibility reasons. * Added Enumeration#default so each subclass can easily find it's default record. * Fixed Enumeration#default to use the STI scoping with a fake default scope for finding Enumeration's default. * Added a 'all' named scope for getting all records in order by position. * Added Deprecation warnings to the old named_scopes in Enumerations. * Moved various methods off of Enumeration and onto the concrete classes * Changed the EnumerationsController to use types * Updated the Enumeration list template * Added has_many relationships to the Enumeration STI classes. * Fixes for tests. #3007 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2777 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Merged Rails 2.2 branch. Redmine now requires Rails 2.2.2.Jean-Philippe Lang2009-02-211-5/+5
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2493 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Replaces Enumeration.get_values and Enumeration.default with named scopes.Jean-Philippe Lang2009-02-151-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2472 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: no error is raised when entering invalid hours on the issue update ↵Jean-Philippe Lang2009-01-091-2/+2
| | | | | | form (#2465). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2251 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds custom fields on time entries (#772).Jean-Philippe Lang2008-07-221-0/+1
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@1689 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: Comment too long message when updating issue (#1550).Jean-Philippe Lang2008-06-301-1/+1
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@1608 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds atom feed on time entries details (#1479).Jean-Philippe Lang2008-06-171-0/+5
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@1560 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: time entries created with the default activity even if a different ↵Jean-Philippe Lang2008-06-141-2/+4
| | | | | | one is specified (#1302). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1533 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: IssueController#edit doesn't set default Activity as default (#1302).Jean-Philippe Lang2008-05-261-0/+6
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@1461 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Estimated time recognizes improved time formats (#1092).Jean-Philippe Lang2008-04-261-13/+1
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@1361 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Accept the following formats for the timelog "hours" field: 1h, 1 h, 1 hour, ↵Jean-Philippe Lang2008-04-021-1/+17
| | | | | | | | 2 hours, 30m, 30min, 1h30, 1h30m, 1:30. Also accept 1,5 for 1.5 hour (closes #975). Note that 1.5 is still equal to 1h30 and not 1h50 (#947). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1320 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds 2 permissions (closes #859):Jean-Philippe Lang2008-03-141-1/+1
| | | | | | | * edit_time_entries: lets a user edit/delete any time entry * edit_own_time_entries: lets a user edit/delete its own time entries only git-svn-id: http://redmine.rubyforge.org/svn/trunk@1249 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Propagates time tracking to the parent project (closes #433). Time report ↵Jean-Philippe Lang2008-02-271-0/+6
| | | | | | enhancements. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1176 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds date range filter and pagination on time entries detail view (closes #434).Jean-Philippe Lang2008-02-261-1/+6
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@1173 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Added time report.Jean-Philippe Lang2007-06-241-0/+17
| | | | | | Report can be generated by member/activity/tracker/version and year/month/week for the selected period. git-svn-id: http://redmine.rubyforge.org/svn/trunk@572 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: 10342 Creation of Schema in OracleJean-Philippe Lang2007-04-251-2/+2
| | | | | | | | | | | | Comment is a reserved keyword for Oracle. The five 'Comment' columns are renamed to 'Commments'. Migration scripts were modified to let oracle users create the database. For the others, migration 41 will rename the columns (only if columns have the 'old' name). Fixed also a few oracle specific issues. Note: currently (in Rails 1.2.3), there's bug in Rails oracle adapter. See: http://dev.rubyonrails.org/ticket/7344 Attached patch is required for redMine to work properly. git-svn-id: http://redmine.rubyforge.org/svn/trunk@479 e93f8b46-1217-0410-a6f0-8f06a7374b81
* added 999 as a maximum for time entry hoursJean-Philippe Lang2007-03-231-1/+1
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@369 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Simple time tracking functionality added. Time can be logged at issue or ↵Jean-Philippe Lang2007-03-231-0/+33
project level. There's no aggregation reports for now, it's just possible to see all time entries for a project or an issue. A new "activities" enumeration is added. Permission for a role to log time must be set (new "Time tracking" section in role permissions screen). git-svn-id: http://redmine.rubyforge.org/svn/trunk@368 e93f8b46-1217-0410-a6f0-8f06a7374b81