Bläddra i källkod

Time entry creation: preserve 'spent on' value when using 'Create and Continue' (#29308).

Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@17459 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.0.0
Go MAEDA 5 år sedan
förälder
incheckning
c76a021e92
2 ändrade filer med 5 tillägg och 4 borttagningar
  1. 1
    0
      app/controllers/timelog_controller.rb
  2. 4
    4
      test/functional/timelog_controller_test.rb

+ 1
- 0
app/controllers/timelog_controller.rb Visa fil

@@ -113,6 +113,7 @@ class TimelogController < ApplicationController
:time_entry => {
:project_id => params[:time_entry][:project_id],
:issue_id => @time_entry.issue_id,
:spent_on => @time_entry.spent_on,
:activity_id => @time_entry.activity_id
},
:back_url => params[:back_url]

+ 4
- 4
test/functional/timelog_controller_test.rb Visa fil

@@ -281,7 +281,7 @@ class TimelogControllerTest < Redmine::ControllerTest
},
:continue => '1'
}
assert_redirected_to '/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=&time_entry%5Bproject_id%5D=1'
assert_redirected_to '/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

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

@@ -315,7 +315,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='
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'
end
end

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


Laddar…
Avbryt
Spara