OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/lib/tasks/fix_positions.rake

11 lines
362 B

namespace :redmine do
namespace :backlogs do
desc "Remove duplicate positions in the issues table"
task :fix_positions => :environment do
Story.find(:all, :conditions => "parent_id is NULL", :order => "project_id ASC, fixed_version_id ASC, position ASC").each_with_index do |s,i|
s.position=i+1
s.save!
end
end
end
end