Redirect to open issues when an issue is reassigned

This commit is contained in:
Tom Hughes 2022-08-26 13:45:25 +01:00
parent 5abccc2e5e
commit cd5b793dca
2 changed files with 2 additions and 2 deletions

View 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")

View 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