Jean-Philippe Lang
05462a145f
Prevents useless COUNT queries.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13514 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-26 22:20:10 +00:00
Jean-Philippe Lang
46d4d75ccd
Code cleanup.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13513 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-26 14:44:11 +00:00
Jean-Philippe Lang
2d64a22dd9
Makes Project#assignable_users return a scope that prevents 2*n queries.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13509 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-25 11:14:16 +00:00
Jean-Philippe Lang
c0f082ad02
Code cleanup.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13508 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-25 09:35:17 +00:00
Jean-Philippe Lang
d62574badb
Code cleanup, use safer #closed?
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13505 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-24 21:40:26 +00:00
Jean-Philippe Lang
67c4936908
Restores commits reverted when rails-4.1 branch was merged ( #18174 ).
...
Patch by Mischa The Evil.
git-svn-id: http://svn.redmine.org/redmine/trunk@13504 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-24 18:41:35 +00:00
Toshi MARUYAMA
6f92548b38
remove unneeded "references" of joins
...
"references" is needed for includes, but not needed for joins.
git-svn-id: http://svn.redmine.org/redmine/trunk@13501 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-24 02:18:45 +00:00
Toshi MARUYAMA
374f4dd52e
use includes instead of joins at Issue#visible
...
"rake test" passes all test, but following test fails on command line.
<pre>
$ ruby test/unit/issue_test.rb -n test_visible_scope_for_member_with_groups_should_return_assigned_issues
1) Failure:
IssueTest#test_visible_scope_for_member_with_groups_should_return_assigned_issues [test/unit/issue_test.rb:321]:
Failed assertion, no message given.
</pre>
git-svn-id: http://svn.redmine.org/redmine/trunk@13500 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-24 02:18:28 +00:00
Jean-Philippe Lang
498a34403a
Removed unneeded :foreign_key option on belongs_to associations.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13484 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-22 18:41:03 +00:00
Jean-Philippe Lang
2d1866d966
Merged rails-4.1 branch ( #14534 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-22 17:37:16 +00:00
Jean-Philippe Lang
b01c740980
Fixed test failure with MySQL introduced by r13467.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13468 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-21 18:44:33 +00:00
Jean-Philippe Lang
51508f67d0
Fixed test failure with SQLServer introduced by r13461.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13467 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-21 17:47:18 +00:00
Jean-Philippe Lang
78120536b1
Fixed tests broken by r13461.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13466 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-20 21:47:43 +00:00
Jean-Philippe Lang
cac6ebb6c5
Code cleanup, removed raw SQL queries.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13461 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-20 19:16:09 +00:00
Jean-Philippe Lang
51db15ac61
Parent issue autocomplete does not follow to the "Allow cross-project subtasks" setting ( #14281 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13400 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-09-14 10:42:31 +00:00
Toshi MARUYAMA
64255dc663
remove unneeded setting self[left_column_name] and self[right_column_name] from Issue#update_nested_set_attributes_on_parent_change ( #6579 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13345 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-08-23 05:45:49 +00:00
Toshi MARUYAMA
d29799712f
remove unneeded statement from Issue#parent_issue_id=
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13303 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-07-13 00:04:23 +00:00
Jean-Philippe Lang
382ca5055a
Field set as read-only still available in the issues list context menu ( #16755 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13124 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-02 07:32:41 +00:00
Toshi MARUYAMA
ce2b12957f
remove trailing white-spaces from Issue#count_and_group_by SQL
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13084 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 11:23:05 +00:00
Toshi MARUYAMA
05d24e64f7
remove trailing white-spaces from Issue#by_subproject SQL
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13083 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 11:22:49 +00:00
Toshi MARUYAMA
3c6d46beec
remove trailing white-spaces from app/models/issue.rb
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13082 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 11:22:33 +00:00
Toshi MARUYAMA
20496b516f
code format clean up Issue#update_versions_from_hierarchy_change
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13081 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 11:22:17 +00:00
Toshi MARUYAMA
66f0a5c2ef
fix typos of source comments at Issue model
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13073 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 08:07:08 +00:00
Toshi MARUYAMA
2ec3b3694f
fix race condition of highest rgt at Issue#update_nested_set_attributes_on_parent_change ( #6579 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13011 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-26 01:48:20 +00:00
Toshi MARUYAMA
3c83d1c646
fix always new lft and rgt are lft = 1, rgt = 2 ( #6579 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13009 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-26 01:47:48 +00:00
Toshi MARUYAMA
4a9d04a767
remove unneeded Relation#all from Issue#workflow_rule_by_attribute
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13000 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-24 16:00:01 +00:00
Toshi MARUYAMA
4162d8ec6b
prevent issue tree hierarchy is broken in race conditions ( #6579 )
...
awesome_nested_set 2.1.6 uses lock.
Issue model uses as same way.
git-svn-id: http://svn.redmine.org/redmine/trunk@12927 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-25 06:54:40 +00:00
Jean-Philippe Lang
9733194cce
Prevent N queries on custom_fields when call /issues API.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12913 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-22 11:23:39 +00:00
Toshi MARUYAMA
a0baf7ee5d
fix wrong issue 'assigned-to-my-group' css class ( #16038 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12844 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 12:16:27 +00:00
Jean-Philippe Lang
888823a449
Fixed calculation of done_ratio of parent task with child having estimated_time at 0 ( #15870 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12745 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-31 17:42:46 +00:00
Jean-Philippe Lang
d5a9af54fa
Reverts r12669 and add a test for #15870 .
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12739 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-30 22:18:07 +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
0daa1a1a4f
Rails4: replace deprecated #connection from Issue model
...
DEPRECATION WARNING: #connection is deprecated in favour of accessing it via the class.
git-svn-id: http://svn.redmine.org/redmine/trunk@12715 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:06:58 +00:00
Jean-Philippe Lang
6f1cda4852
Make sure that we don't set the done ratio to a value > 100% ( #15870 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12669 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-19 08:35:59 +00:00
Toshi MARUYAMA
56a3c1ad40
Rails4: replace deprecated Relation#sum with finder options at Issue#total_spent_hours
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12588 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 05:02:44 +00:00
Toshi MARUYAMA
5feb02c31d
Rails4: replace deprecated Relation#calculate with finder options at Issue model
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12537 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 14:53:29 +00:00
Toshi MARUYAMA
8aa22a05f4
Rails4: replace deprecated Relation#update_all at Issue model
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12532 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 12:20:52 +00:00
Toshi MARUYAMA
599ac20570
Rails4: replace deprecated Relation#update_all at Issue model
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12528 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 10:27:37 +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
0ee2af4c06
Fixed that previous assignee is not notified on issue update ( #15714 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12419 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-17 20:48:18 +00:00
Toshi MARUYAMA
16b94e126b
code format cleanup app/models/issue.rb
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12230 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-10-24 05:40:21 +00:00
Jean-Philippe Lang
99bf8c95ab
Fixed that issue nested set update is triggered even if parent is not changed ( #15135 ).
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12226 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-10-20 09:25:14 +00:00
Jean-Philippe Lang
94e7df78ca
Fixed that controller_issues_edit_before/after_save hooks have no controller context ( #15044 ).
...
Patch by Jordan Hollinger.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12219 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-10-13 10:31:04 +00:00
Jean-Philippe Lang
62b66e9b38
Prevents invalid SQL with invalid group_ids ( #14902 ).
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12162 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-09-25 17:35:59 +00:00
Jean-Philippe Lang
cb747a34ef
Wrong done_ratio calculation for parent with subtask having estimated_hours=0 ().
...
Patch by Daniel Felix.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12131 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-09-11 22:00:18 +00:00
Toshi MARUYAMA
ae2b47afd6
code format cleanup app/models/issue.rb
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12087 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-08-06 06:27:16 +00:00
Jean-Philippe Lang
474453d2b0
Additional status transitions for assignees do not work if assigned to a group ( #14447 ).
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12056 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-07-28 14:58:06 +00:00
Jean-Philippe Lang
205eda8b33
Use AR callbacks instead of observers (removed in Rails4) for notifications.
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12021 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-07-14 14:26:27 +00:00
Jean-Philippe Lang
594589e0ec
Use Hash#reject that returns a Hash with ruby1.8 when Hash#select that returns an Array.
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12016 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-07-13 10:39:36 +00:00