]> git.openstreetmap.org Git - rails.git/commitdiff
Redirect to open issues when an issue is reassigned
authorTom Hughes <tom@compton.nu>
Fri, 26 Aug 2022 12:45:25 +0000 (13:45 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 26 Aug 2022 12:49:09 +0000 (13:49 +0100)
app/controllers/issue_comments_controller.rb
test/system/issues_test.rb

index a4bb6a5ed15af00df5bd0b60132cdfc67461681e..7b935665f5bd4b1e86c3bc1e2a5ee6966eec3dbb 100644 (file)
@@ -19,7 +19,7 @@ class IssueCommentsController < ApplicationController
       if current_user.has_role? @issue.assigned_role
         redirect_to @issue
       else
-        redirect_to issues_path
+        redirect_to issues_path(:status => "open")
       end
     else
       flash[:notice] = t(".comment_created")
index e93e92a696aa1cfef262b886fba238c72d2bbae9..b9b989c075132a9604d01c911dc2017f2613538f 100644 (file)
@@ -126,7 +126,7 @@ class IssuesTest < ApplicationSystemTestCase
     click_on "Add Comment"
 
     assert_content "and the issue was reassigned"
-    assert_current_path issues_path
+    assert_current_path issues_path(:status => "open")
 
     issue.reload
     assert_equal "moderator", issue.assigned_role