1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00:00

Fix missing project_id in redirect after clicking "Create and add another" button (#35066).

Patch by Jérôme BATAILLE.


git-svn-id: https://svn.redmine.org/redmine/trunk@22096 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2023-02-05 23:30:46 +00:00
parent ea4ce319fe
commit 2496d4396b
2 changed files with 2 additions and 1 deletions

View File

@ -131,6 +131,7 @@ class TimelogController < ApplicationController
:back_url => params[:back_url]
}
if params[:project_id] && @time_entry.project
options[:time_entry][:project_id] ||= @time_entry.project.id
redirect_to new_project_time_entry_path(@time_entry.project, options)
elsif params[:issue_id] && @time_entry.issue
redirect_to new_issue_time_entry_path(@time_entry.issue, options)

View File

@ -471,7 +471,7 @@ class TimelogControllerTest < Redmine::ControllerTest
},
:continue => '1'
}
assert_redirected_to '/projects/ecookbook/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=&time_entry%5Bproject_id%5D=&time_entry%5Bspent_on%5D=2008-03-14'
assert_redirected_to '/projects/ecookbook/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=&time_entry%5Bproject_id%5D=1&time_entry%5Bspent_on%5D=2008-03-14'
end
end