Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge 2-1-stable to master #265

Merged
merged 15 commits into from
May 24, 2014
Merged

merge 2-1-stable to master #265

merged 15 commits into from
May 24, 2014

Conversation

marutosi
Copy link
Contributor

No description provided.

rathgar and others added 15 commits December 22, 2013 22:16
Optionally touch all ancestors on save
Redmine Defect 7920
Attempted to update a stale object when copying a project
http:https://www.redmine.org/issues/7920

This revision passes Redmine test.
http:https://www.redmine.org/projects/redmine/repository/entry/trunk/test/unit/issue_nested_set_test.rb?rev=12679#L244

https://travis-ci.org/marutosi/redmine/jobs/17215987#L1979

<pre>
  1) Error:
test_destroy_parent_issue_updated_during_children_destroy(IssueNestedSetTest):
ActiveRecord::StaleObjectError: Attempted to destroy a stale object: Issue
    app/models/issue.rb:179:in `destroy'
    test/unit/issue_nested_set_test.rb:250:in `test_destroy_parent_issue_updated_during_children_destroy'
    test/unit/issue_nested_set_test.rb:249:in `test_destroy_parent_issue_updated_during_children_destroy'
</pre>
…n order clause is ambiguous

On 2-1-stable 3d5ac74, Redmine test fails.
https://bitbucket.org/marutosi/redmine-bb-awesome_nested_set-use-gem/src/2ac1078370/Gemfile#cl-10
https://drone.io/bitbucket.org/marutosi/redmine-bb-awesome_nested_set-use-gem/2

<pre>
 13) Error:
    test_visible_and_nested_set_scopes(IssueTest):
    ActiveRecord::StatementInvalid: Mysql2::Error: Column 'lft' in order clause is ambiguous:
</pre>

http:https://www.redmine.org/projects/redmine/repository/revisions/12689/annotate/trunk/test/unit/issue_test.rb#L332
<pre>
  def test_visible_and_nested_set_scopes
    assert_equal 0, Issue.find(1).descendants.visible.all.size
  end
</pre>
Fix for the following error with mssql with jruby/activerecord-jdbc-adapter:
ActiveRecord::StatementInvalid: ActiveRecord::JDBCError: No column was specified for column 3 of 't'.: SELECT t.* FROM ( SELECT ROW_NUMBER() OVER(ORDER BY MIN(users.id)) AS _row_num, [users].[lft], COUNT([users].[lft]) FROM [users]  GROUP BY [users].[lft] HAVING COUNT([users].[lft]) > 1 ) AS t WHERE t._row_num BETWEEN 1 AND 1
Conflicts:
	lib/awesome_nested_set/move.rb
Conflicts:
	lib/awesome_nested_set/move.rb
2-1-stable: fix deleting a parent may lead to a stale object error
2-1-stable: fix ActiveRecord::StatementInvalid: Error: Column 'lft' in order clause is ambiguous
Fix for mssql with jruby/activerecord-jdbc-adapter
parndt added a commit that referenced this pull request May 24, 2014
@parndt parndt merged commit 9bdb148 into collectiveidea:master May 24, 2014
@parndt
Copy link
Collaborator

parndt commented May 24, 2014

Thanks a lot!

@marutosi marutosi deleted the master-2-1-stable branch May 24, 2014 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants