Project

General

Profile

Actions

Patch #5441

closed

Initialize TimeEntry attributes with params[:time_entry]

Added by Jérémie Delaitre almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Category:
Time tracking
Target version:
Start date:
2010-05-04
Due date:
% Done:

0%

Estimated time:

Description

I've made a one-liner patch to fill the new TimeEntry attributes created in IssuesController#update_issue_from_param with the params[:time_entry].

This allows to pre-fill the spent time field when accessing the issue editing page.

I want to use this feature for my time tracker plugin. When the user stops his time tracker, I want to redirect him to the issue editing page to let him change what he wants (%done ratio for example) and enter a time log comment. However, I need to be able to fill the spent time field for him with the time tracker value.


Files

time_entry_init.diff (732 Bytes) time_entry_init.diff Jérémie Delaitre, 2010-05-04 17:54
time_entry_init.diff (2.14 KB) time_entry_init.diff Updated patch with functional test Jérémie Delaitre, 2010-10-26 19:44
time_entry_init.diff (2.1 KB) time_entry_init.diff With working functional test Jérémie Delaitre, 2010-11-04 22:40
Actions #1

Updated by Ludovic Gasc over 13 years ago

  • Assignee changed from Eric Davis to Jean-Philippe Lang

+1

I valid this patch, it's useful with this plugin: http://github.com/delaitre/redmine_time_tracker
Moreover, some other plugins could use this feature to pre-populate the timesheet part in the edit form.

Somebody in the Redmine team could integrate this patch in the Redmine trunk ?
Thanks.

Actions #2

Updated by Jérémie Delaitre over 13 years ago

I still need this patch (1 line!). Is there any chance to get it included?

Actions #3

Updated by Jean-Philippe Lang over 13 years ago

Could you update the patch for current trunk and include a functional test ?

Actions #4

Updated by Jérémie Delaitre over 13 years ago

I've updated the patch according to current github master.
The 'test_get_edit_with_params' functional test has been updated too to check the time_entry params.

Actions #5

Updated by Jérémie Delaitre over 13 years ago

I forgot to ask you to execute the updated test as I'm not confident in my redmine installation...

Actions #6

Updated by Jérémie Delaitre over 13 years ago

Ok, I finally have a working redmine install for testing purpose. It appears that my previous patch contains a bug in the functional test. I fixed it in this new patch (which should be the last one!).

Actions #7

Updated by Jérémie Delaitre over 13 years ago

Any chance to have this included in 1.0.4 or 1.1.0 ?

Actions #8

Updated by Jean-Philippe Lang over 13 years ago

  • Status changed from New to Closed
  • Target version set to 1.1.0

Patch commited in r4411.
As it's not a fix, it won't be merged in 1.0-stable but in 1.1.
Thanks.

Actions

Also available in: Atom PDF