forked from backlogs/redmine_backlogs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove position from an issue when it is changed from a story into a …
…task
- Loading branch information
friflaj
committed
Aug 15, 2010
1 parent
61aa352
commit 314271f
Showing
3 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
db/migrate/015_remove_task_position.rb → db/migrate/015_order_tasks_using_tree.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class RemoveTaskPosition < ActiveRecord::Migration | ||
def self.up | ||
ActiveRecord::Base.transaction do | ||
Task.find(:all, :conditions => "id <> root_id and not position is null").each do |t| | ||
t.remove_from_list | ||
end | ||
end | ||
end | ||
|
||
def self.down | ||
raise ActiveRecord::IrreversibleMigration | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters