Patch #29308
closedTime entry creation: preserve 'spent on' value when using 'Create and Continue'
Added by Jens Krämer over 6 years ago. Updated over 6 years ago.
Description
When creating a time entry and using the 'Create and continue' button to save and return to the form, the previously entered date is replaced with the current date while issue id and activity are preserved. This patch changes that so the previously entered date is preserved as well.
Files
0001-time-entry-creation-preserve-spent-on-when-using-cre.patch (936 Bytes) 0001-time-entry-creation-preserve-spent-on-when-using-cre.patch | Jens Krämer, 2018-08-01 07:17 | ||
0002-amends-the-timelog_controller_test-to-account-for-sp.patch (2.36 KB) 0002-amends-the-timelog_controller_test-to-account-for-sp.patch | Jens Krämer, 2018-08-02 05:18 |
Related issues
Updated by Go MAEDA over 6 years ago
- Target version set to 3.3.9
I think it is very natural to preserve date and there is no reason not to do so. Probably most users expect the proposed behavior. Setting target version to 3.3.9.
Updated by Marius BĂLTEANU over 6 years ago
Go MAEDA wrote:
I think it is very natural to preserve date and there is no reason not to do so. Probably most users expect the proposed behavior. Setting target version to 3.3.9.
Indeed.
+1
Updated by Go MAEDA over 6 years ago
- Assignee set to Jens Krämer
The patch breaks some tests. Would you update the tests?
Failure: TimelogControllerTest#test_create_and_continue_at_project_level [test/functional/timelog_controller_test.rb:273]: Expected response to be a redirect to <http://test.host/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=&time_entry%5Bproject_id%5D=1> but was a redirect to <http://test.host/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>. Expected "http://test.host/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=&time_entry%5Bproject_id%5D=1" to be === "http://test.host/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". bin/rails test test/functional/timelog_controller_test.rb:271 ..............................................F Failure: TimelogControllerTest#test_create_and_continue_with_issue_id [test/functional/timelog_controller_test.rb:324]: Expected response to be a redirect to <http://test.host/issues/1/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=1&time_entry%5Bproject_id%5D=> but was a redirect to <http://test.host/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>. Expected "http://test.host/issues/1/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=1&time_entry%5Bproject_id%5D=" to be === "http://test.host/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". bin/rails test test/functional/timelog_controller_test.rb:322 ...............F Failure: TimelogControllerTest#test_create_and_continue_at_issue_level [test/functional/timelog_controller_test.rb:290]: Expected response to be a redirect to <http://test.host/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=1&time_entry%5Bproject_id%5D=> but was a redirect to <http://test.host/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>. Expected "http://test.host/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=1&time_entry%5Bproject_id%5D=" to be === "http://test.host/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". bin/rails test test/functional/timelog_controller_test.rb:288 .....F Failure: TimelogControllerTest#test_create_and_continue_with_project_id [test/functional/timelog_controller_test.rb:307]: Expected response to be a redirect to <http://test.host/projects/ecookbook/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=&time_entry%5Bproject_id%5D=> but was a redirect to <http://test.host/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>. Expected "http://test.host/projects/ecookbook/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=&time_entry%5Bproject_id%5D=" to be === "http://test.host/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". bin/rails test test/functional/timelog_controller_test.rb:305
Updated by Jens Krämer over 6 years ago
- File 0002-amends-the-timelog_controller_test-to-account-for-sp.patch 0002-amends-the-timelog_controller_test-to-account-for-sp.patch added
my bad, please find attached a second patch that fixes those.
Updated by Go MAEDA over 6 years ago
- Assignee changed from Jens Krämer to Go MAEDA
Great, everything is fine now. Thanks.
Updated by Go MAEDA over 6 years ago
- Status changed from Resolved to Closed
Committed. Thank you for sharing the improvement.
Updated by Marius BĂLTEANU over 6 years ago
- Has duplicate Feature #28081: Option to keep last spent-time date on "create and continue" added