[DRE-commits] [redmine] 10/15: fix moving issues across projects (Closes: #783717)

Antonio Terceiro terceiro at moszumanska.debian.org
Sat May 2 21:00:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository redmine.

commit 3620b5a3d0393e5ecd5bf4d91aec58d57430912a
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sat May 2 11:02:35 2015 -0300

    fix moving issues across projects (Closes: #783717)
---
 debian/changelog                                   |  2 +
 .../patches/fix-move-issue-between-projects.patch  | 47 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 50 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f589176..65e5d13 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,8 @@ redmine (3.0~20140825-6) UNRELEASED; urgency=medium
     - install bin/ directory so rails detects redmine as a proper Rails app
     - don't install deprecated script/ directory
   * debian/postinst: fix check for existing session.yml file
+  * debian/patches/fix-move-issue-between-projects.patch: applied patch by
+    Tristam Fenton-May to fix moving issues across projects (Closes: #783717)
 
  -- Antonio Terceiro <terceiro at debian.org>  Wed, 08 Apr 2015 12:06:32 +0200
 
diff --git a/debian/patches/fix-move-issue-between-projects.patch b/debian/patches/fix-move-issue-between-projects.patch
new file mode 100644
index 0000000..234aace
--- /dev/null
+++ b/debian/patches/fix-move-issue-between-projects.patch
@@ -0,0 +1,47 @@
+Description: Fix moving issues between projects
+ For some reason this bug does not affect upstream. Probably the 3.0~20140825
+ snapshot was taken at a time when this was broken but the brokennes never made
+ it into a release.
+Author: Tristam Fenton-May <tfm-debian at earth.li>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783717
+Forwarded: not-needed
+Reviewed-by: Antonio Terceiro <terceiro at debian.org>
+Last-Update: 2015-05-02
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/app/controllers/issues_controller.rb
++++ b/app/controllers/issues_controller.rb
+@@ -21,7 +21,8 @@ class IssuesController < ApplicationCont
+ 
+   before_filter :find_issue, :only => [:show, :edit, :update]
+   before_filter :find_issues, :only => [:bulk_edit, :bulk_update, :destroy]
+-  before_filter :find_project, :only => [:new, :create, :update_form]
++  before_filter :find_project, :only => [:new, :create]
++  before_filter :find_project_from_issue, :only => [:update_form]
+   before_filter :authorize, :except => [:index]
+   before_filter :find_optional_project, :only => [:index]
+   before_filter :check_for_default_issue_status, :only => [:new, :create]
+@@ -352,6 +353,13 @@ class IssuesController < ApplicationCont
+     render_404
+   end
+ 
++  def find_project_from_issue
++    project_id = (params[:issue] && params[:issue][:project_id])
++    @project = Project.find(project_id)
++  rescue ActiveRecord::RecordNotFound
++    render_404
++  end
++
+   def retrieve_previous_and_next_issue_ids
+     retrieve_query_from_session
+     if @query
+@@ -419,7 +427,7 @@ class IssuesController < ApplicationCont
+       end
+       @issue.project = @project
+     else
+-      @issue = @project.issues.visible.find(params[:id])
++      @issue = Issue.visible.find(params[:id])
+     end
+ 
+     @issue.project = @project
diff --git a/debian/patches/series b/debian/patches/series
index 16069f9..8311190 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ drop-update_all.patch
 invalidate-language-cache-from-older-versions.diff
 avoid-crash-on-issues.diff
 0001-Escape-flash-messages-19117.patch
+fix-move-issue-between-projects.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/redmine.git



More information about the Pkg-ruby-extras-commits mailing list