プロジェクト

全般

プロフィール

Vote #79455

完了

Time entry creation: preserve 'spent on' value when using 'Create and Continue'

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Time tracking_13
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
13
version_id:
142
issue_org_id:
29308
author_id:
40856
assigned_to_id:
332
comments:
8
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

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.
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
The patch breaks some tests. Would you update the tests?

{{collapse
<pre>
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
</pre>
}}
--------------------------------------------------------------------------------
my bad, please find attached a second patch that fixes those.
--------------------------------------------------------------------------------
Great, everything is fine now. Thanks.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed. Thank you for sharing the improvement.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

duplicates,Closed,28081,Option to keep last spent-time date on "create and continue"

Admin Redmine さんが3年以上前に更新

  • カテゴリTime tracking_13 にセット
  • 対象バージョン3.3.9_142 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0