Commit Graph

223 Commits

Author SHA1 Message Date
Toshi MARUYAMA 597d042ec2 fix typos of source comments at Project model
git-svn-id: http://svn.redmine.org/redmine/trunk@13057 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-06 14:14:23 +00:00
Toshi MARUYAMA 5e0d93b689 fix typo of Enumeration#overridding_change?
git-svn-id: http://svn.redmine.org/redmine/trunk@13056 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-06 13:32:35 +00:00
Jean-Philippe Lang 2585ed2e3b Use spaces instead of tabs.
git-svn-id: http://svn.redmine.org/redmine/trunk@12867 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-09 11:58:19 +00:00
Jean-Philippe Lang 1ad33134d3 Enable the watching of news (#2549).
git-svn-id: http://svn.redmine.org/redmine/trunk@12866 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-09 11:54:21 +00:00
Jean-Philippe Lang 171581da7e Project.activities should always return a ActiveRecord::Relation (#15983).
git-svn-id: http://svn.redmine.org/redmine/trunk@12854 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-07 08:36:49 +00:00
Toshi MARUYAMA 35cc911192 update copyright year (#15977)
Contributed by Daniel Felix.

git-svn-id: http://svn.redmine.org/redmine/trunk@12736 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-29 22:45:39 +00:00
Toshi MARUYAMA a711cbb44e back out from r12715 to r12720: #connection replacing
These revisions have performance regression on Rails 3.2.16.

git-svn-id: http://svn.redmine.org/redmine/trunk@12735 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 07:21:47 +00:00
Toshi MARUYAMA b6f066ddf3 remove unneeded Relation#all from Project model
git-svn-id: http://svn.redmine.org/redmine/trunk@12729 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 02:18:30 +00:00
Toshi MARUYAMA f5c5393d09 Rails4: replace deprecated #connection from Project model
DEPRECATION WARNING: #connection is deprecated in favour of accessing it via the class.

git-svn-id: http://svn.redmine.org/redmine/trunk@12719 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:08:09 +00:00
Toshi MARUYAMA bdfcfb35a3 remove unneeded Project#acts_as_nested_set :order => 'name' option
git-svn-id: http://svn.redmine.org/redmine/trunk@12686 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-21 06:51:39 +00:00
Toshi MARUYAMA 962ecabc47 call Project#set_or_update_position_under in Project.rebuild_tree! (#12431)
git-svn-id: http://svn.redmine.org/redmine/trunk@12683 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-21 06:29:48 +00:00
Toshi MARUYAMA 89c43d24c8 back out r12680
<pre>
  1) Failure:
test_children(ProjectTest) [test/unit/project_test.rb:374]:
<[5, 3, 4]> expected but was
<[3, 4, 5]>.
</pre>

git-svn-id: http://svn.redmine.org/redmine/trunk@12681 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 13:35:05 +00:00
Toshi MARUYAMA 1c0c22de17 use :order_column option instead of :order for acts_as_nested_set
git-svn-id: http://svn.redmine.org/redmine/trunk@12680 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 12:53:01 +00:00
Toshi MARUYAMA 073b403bd9 Rails4: replace deprecated Relation#update_all at Project#create_time_entry_activity_if_needed
git-svn-id: http://svn.redmine.org/redmine/trunk@12614 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 12:49:20 +00:00
Toshi MARUYAMA c0e587ffc4 remove unneeded Relation#all from Project#copy_issues
git-svn-id: http://svn.redmine.org/redmine/trunk@12541 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 00:05:33 +00:00
Jean-Philippe Lang 5c5ba0c61a Fixed that time entries custom values are not deleted when deleting a project or an issue (#15709).
git-svn-id: http://svn.redmine.org/redmine/trunk@12421 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-18 18:39:09 +00:00
Jean-Philippe Lang b48fcdaa97 Avoid a query if enabled_modules association is already loaded (#15058).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12228 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-10-20 16:04:04 +00:00
Jean-Philippe Lang e978b3ace0 Adds User#builtin_role.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11965 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-06-12 19:38:43 +00:00
Toshi MARUYAMA a0423f4eb1 fix that project auto generation fails when projects created in the same time (#14242)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11942 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-06-08 09:50:34 +00:00
Jean-Philippe Lang bf76b3b286 Project#all_issue_custom_fields now returns a scope.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11916 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-06-01 10:26:17 +00:00
Jean-Philippe Lang ed364c9114 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11873 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-05-18 19:58:43 +00:00
Jean-Philippe Lang ece5232110 Fixed that values of custom fields are not kept in issues when copying a project (#13910).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11843 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-05-13 19:52:37 +00:00
Toshi MARUYAMA fe903be480 remove trailing white-space from app/models/project.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11736 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-04-21 04:56:26 +00:00
Jean-Philippe Lang 6d20cfe831 Moves Project#users to a regular method.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11609 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-03-12 18:32:36 +00:00
Jean-Philippe Lang 3528343863 Moves Project#principals to a regular method.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11608 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-03-12 18:07:37 +00:00
Jean-Philippe Lang 5c1e1ee4bb Fixed that #reload raises a Stack too deep error with ruby 2.0.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11497 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-28 18:47:25 +00:00
Toshi MARUYAMA e31a8e2cb3 remove trailing tabs from app/models/project.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11415 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-17 10:14:08 +00:00
Jean-Philippe Lang 4e9fbeb851 Possibility to define the default enable trackers when creating a project (#13175).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11394 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-15 08:28:34 +00:00
Jean-Philippe Lang 0d93b6dc3c Typo that breaks with ruby1.8.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11337 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-09 15:20:07 +00:00
Jean-Philippe Lang 0f2ee79f35 Fixed that project overview page shows trackers from subprojects with disabled issue module (#13076).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11336 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-09 13:56:11 +00:00
Jean-Philippe Lang 2cd749955e Fixed: error raised when copying project wiki with wiki module disabled (#13097).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11332 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-07 19:24:57 +00:00
Jean-Philippe Lang 9536d04c1e Typo that triggers an error when editing a subproject (#5605).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11301 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-02 13:18:04 +00:00
Jean-Philippe Lang 0f29e265fc Optionaly inherit members from parent project (#5605).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11298 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-02 12:50:45 +00:00
Jean-Philippe Lang e396a0eebe Copyright for 2013 (#12788).
Patch by Daniel Felix.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11169 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-12 09:29:31 +00:00
Jean-Philippe Lang 8ee0b52d59 Gantt perf: fixed that Project#start_date and #due_date run way too much queries.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11135 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-06 14:03:49 +00:00
Jean-Philippe Lang 9613a13b10 Deprecates Version#*_pourcent in favour of #*_percent (#12724).
Patch by Daniel Felix.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11113 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-04 08:30:25 +00:00
Jean-Philippe Lang ab066317e6 Adds STI to Query model. Issue queries are now IssueQuery instances.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10964 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-09 14:10:49 +00:00
Jean-Philippe Lang 147e7a8d61 Use \A and \z in validation regexps.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10960 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-08 10:59:31 +00:00
Jean-Philippe Lang 4c6dfdf95f Cleanup dependencies in Project model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10959 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-08 10:45:34 +00:00
Jean-Philippe Lang 7222e4012d Rewrites named scopes with ARel queries.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10950 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-07 17:59:20 +00:00
Jean-Baptiste Barth 4896d5c7e8 Use lambda form in model scopes (#12499)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10949 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-07 10:12:47 +00:00
Jean-Philippe Lang 33549495c9 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10939 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-03 23:03:33 +00:00
Jean-Philippe Lang 31c33f462d Replaces find(:first) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10928 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-03 18:21:32 +00:00
Jean-Philippe Lang 45ea24ecad Replaces find(:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10921 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-02 20:43:16 +00:00
Jean-Philippe Lang 536747b747 Replaces find(:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10917 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-02 20:23:48 +00:00
Jean-Philippe Lang dc68be983a Use Project.rebuild_tree! instead of .rebuild! in migration.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10868 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-23 17:53:12 +00:00
Jean-Philippe Lang 25c63ec747 Adds a Project.rebuild_tree! method to force the rebuild of the nested set.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10867 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-23 17:50:46 +00:00
Jean-Philippe Lang f1fdbf8d80 Do not link copied issues when copying a project (#6899).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10495 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-27 22:27:37 +00:00
Jean-Philippe Lang 18d1c62ca8 Use eager loaded #principal association instead of #user (#11904).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10442 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-22 10:12:59 +00:00
Jean-Philippe Lang 5ce2f4f81c Use eager loaded #principal association instead of #user (#11904).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10441 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-22 09:48:38 +00:00