]> source.dussan.org Git - redmine.git/commitdiff
Merged r3930 from trunk.
authorEric Davis <edavis@littlestreamsoftware.com>
Thu, 19 Aug 2010 04:32:42 +0000 (04:32 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Thu, 19 Aug 2010 04:32:42 +0000 (04:32 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3980 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb

index 7fb4148ed9e461a5a0b94850946a9dad7a872c35..a7e227c85239efd3d10b21bab966124b7b2cea18 100644 (file)
@@ -251,6 +251,18 @@ class IssuesController < ApplicationController
   end
 
   def move
+    @issues.sort!
+    @copy = params[:copy_options] && params[:copy_options][:copy]
+    @allowed_projects = Issue.allowed_target_projects_on_move
+    @target_project = @allowed_projects.detect {|p| p.id.to_s == params[:new_project_id]} if params[:new_project_id]
+    @target_project ||= @project    
+    @trackers = @target_project.trackers
+    @available_statuses = Workflow.available_statuses(@project)
+    render :layout => false if request.xhr?
+  end
+
+  # TODO: more descriptive name? move to separate controller like IssueMovesController?
+  def perform_move
     @issues.sort!
     @copy = params[:copy_options] && params[:copy_options][:copy]
     @allowed_projects = Issue.allowed_target_projects_on_move
@@ -285,12 +297,6 @@ class IssuesController < ApplicationController
       end
       return
     end
-    render :layout => false if request.xhr?
-  end
-
-  # TODO: more descriptive name? move to separate controller like IssueMovesController?
-  def perform_move
-    move
   end
   
   def destroy