Project

General

Profile

Actions

Feature #6833

open

Spent time in a configurable unit

Added by Damien Couderc over 13 years ago. Updated about 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Time tracking
Target version:
-
Start date:
2010-11-04
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

All the projects I've done professionally were estimated in days and it's still true for my current tasks.

A good improvement to Redmine would be to be able to choose the unit of time.

In the forum thread Time tracking in days instead of hours and calculate "% d..., someone proposed to add a unit of time to the value which could be a solution.
But this could imply that every user should set what hours mean a day and how many days are in a week.

Anyone interested ?


Files

update2_2.JPG (34 KB) update2_2.JPG Tieu-Philippe Khim, 2011-07-21 13:15
config.JPG (33.9 KB) config.JPG Tieu-Philippe Khim, 2011-07-21 13:15
issue_details.JPG (33.9 KB) issue_details.JPG Tieu-Philippe Khim, 2011-07-21 13:15
update1_1.JPG (19.3 KB) update1_1.JPG Tieu-Philippe Khim, 2011-07-21 13:15
update1_2.JPG (35 KB) update1_2.JPG Tieu-Philippe Khim, 2011-07-21 13:15
update2_1.JPG (17.9 KB) update2_1.JPG Tieu-Philippe Khim, 2011-07-21 13:15
ScreenShot002.png (29.9 KB) ScreenShot002.png Mseuda Adeusm, 2011-10-05 20:59

Related issues

Related to Redmine - Patch #5007: Time spent displayed in human readable format (hours minutes)Closed2010-03-08

Actions
Related to Redmine - Feature #877: ability to vary the units used to track timeNew2008-03-17

Actions
Actions #1

Updated by Holger Just over 13 years ago

You are invited to build a patch and we will review it in here.

Actions #2

Updated by Damien Couderc over 13 years ago

Thank you for the invitation but if I had the time and the knowledge to do it, the patch would already be attached to the issue :)

Actions #3

Updated by Tieu-Philippe Khim over 12 years ago

I start to make it!

What i've done is that you can put the estimated time on :
- Day (d)
- Week (w)
- Month (m)
- Year (y)

By typing 1d => 1*hours_in_day (the char at the end is the unit)
3w => (3*days_in_week)*hours_in_day

I just calculate the number of hour in function of the unit. And overload the view for more flexibility.

The char for time unit will be customize for the differents context.
Right now i try to modify the time tracker to support the char unit.

I'll send a patch soon when that will be good.

ps : sorry for my poor english

Actions #4

Updated by Tieu-Philippe Khim over 12 years ago

My plugin will be ready.

I put some screenshots to have an idea of what that looks like.

configuration screen:

issue detail:

Update 1:

Update 2:

Actions #5

Updated by Jérôme BATAILLE over 12 years ago

Is your plugin finished ? we could be interrested to test it.

Actions #6

Updated by Tieu-Philippe Khim over 12 years ago

Yes!

Of course! I'm gonna to store my plugin on github.
I have to improve the plugin, because the scope of my plugin is global and not per project.

By all the way, tomorrow i'll send the uri

Actions #7

Updated by Tieu-Philippe Khim over 12 years ago

Here the link of my plugin : https://github.com/spike008t/redmine_advanced_issues/

But, that just the first version and not optimized.
I have to improve the plugin.

Actions #8

Updated by Mike Dubman over 12 years ago

tried it, after installation, when trying to enter into any issue getting error, here is a log:


Processing IssuesController#show (for 89.139.180.173 at 2011-08-31 14:45:32) [GET]
  Parameters: {"action"=>"show", "id"=>"12", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml

ActionView::TemplateError (undefined method `miss_time?' for #<Issue:0x2ab263259280>) on line #3 of vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:
1: <%= render :partial => 'action_menu' %>
2:
3: <h2><%= issue_heading(@issue) %> <%= " - Attention il y a un risque!" if @issue.has_risk? %></h2>
4:
5: <div class="<%= @issue.css_classes %> details">
6:         <%= avatar(@issue.author, :size => "50") %>

    vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:3:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47show46rhtml'
    app/controllers/issues_controller.rb:121:in `show'
    app/controllers/issues_controller.rb:120:in `show'
    config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'

Rendering /scrap/redmine-1.2.0-0/apps/redmine/public/500.html (500 Internal Server Error)

Processing IssuesController#show (for 89.139.180.173 at 2011-08-31 14:45:39) [GET]
  Parameters: {"action"=>"show", "id"=>"12", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml

ActionView::TemplateError (undefined method `miss_time?' for #<Issue:0x2adce2c4ed40>) on line #3 of vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:
1: <%= render :partial => 'action_menu' %>
2:
3: <h2><%= issue_heading(@issue) %> <%= " - Attention il y a un risque!" if @issue.has_risk? %></h2>
4:
5: <div class="<%= @issue.css_classes %> details">
6:         <%= avatar(@issue.author, :size => "50") %>

    vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:3:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47show46rhtml'

Actions #9

Updated by Tieu-Philippe Khim over 12 years ago

I have update the repository, could you try?

Actions #10

Updated by Mike Dubman over 12 years ago

Philippe Khim wrote:

I have update the repository, could you try?

Fails, when clicking on any issue id. Is there any special install instructions?


ActionView::TemplateError (undefined method `miss_time?' for #<Issue:0x2b0665c5ffd0>) on line #3 of vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:
1: <%= render :partial => 'action_menu' %>
2:
3: <h2><%= issue_heading(@issue) %> <%= " - Attention il y a un risque!" if @issue.has_risk? %></h2>
4:
5: <div class="<%= @issue.css_classes %> details">
6:         <%= avatar(@issue.author, :size => "50") %>

    vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:3:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47show46rhtml'
    app/controllers/issues_controller.rb:121:in `show'
    app/controllers/issues_controller.rb:120:in `show'
    config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'

Rendering /scrap/redmine-1.2.0-0/apps/redmine/public/500.html (500 Internal Server Error)

Processing IssuesController#show (for 193.47.165.2 at 2011-09-18 09:11:39) [GET]
  Parameters: {"action"=>"show", "id"=>"11", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml

ActionView::TemplateError (undefined method `miss_time?' for #<Issue:0x2aca0ab50eb0>) on line #3 of vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:
1: <%= render :partial => 'action_menu' %>
2:
3: <h2><%= issue_heading(@issue) %> <%= " - Attention il y a un risque!" if @issue.has_risk? %></h2>
4:
5: <div class="<%= @issue.css_classes %> details">
6:         <%= avatar(@issue.author, :size => "50") %>

    vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:3:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47show46rhtml'
    app/controllers/issues_controller.rb:121:in `show'
    app/controllers/issues_controller.rb:120:in `show'
    config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'
Actions #11

Updated by Stéphane Carré over 12 years ago

For my point of view this plugin is the main lack of Redmine to have a professional project management (coupled with redmine_better_gantt_chart it can be one of the best). But I have the same problem like Mike Dubman when clicking on any issue id.

What I can see is that 'miss_time' comes from your 'issue_patch.rb' at line 39 :

38 def has_risk?
39 (spent_time_over_estimated? || miss_time? || behind_schedule?) && !closed?
40 end #has_risk

Where do you use it from (do you have other plugins you are depending on ? en français : n'as tu pas des dépendances avec d'autres plugins ?)

Actions #12

Updated by Stéphane Carré over 12 years ago

you will have same problem with method "behind_schedule" not defined

Actions #13

Updated by Tieu-Philippe Khim over 12 years ago

So, I'm gonna to fix the differents missing methods, i forget that I've added some methods but directly into the issue model.

I'll send a message when everything is done (I mean i'm gonna write some tests et try it on a fresh install from scratch).

Stay on touch :)

En français : Alors j'ai oublié des methods que j'ai directement écrit dans le code source de redmine... Je vais les rajouter dans le patch, écrire des tests

Actions #14

Updated by Tieu-Philippe Khim over 12 years ago

I just push the source code. I think that should work, I'll add some stufs

Actions #15

Updated by Stéphane Carré over 12 years ago

Quel talent !
It works like a charm

Actions #16

Updated by Mike Dubman over 12 years ago

now no error, but - when trying to update any issue - getting this error in the browser:

Log time is invalid
Activity can't be blank
Start time can't be empty
Hours must be grater than 0
End time must be bigger than Start hour
Actions #17

Updated by Tieu-Philippe Khim over 12 years ago

So, I've push on github some modification, right now I think that should work.
Could you try again?

In fact, the problem is on log time, I return 0 but that nil the good value!

Actions #18

Updated by Stéphane Carré over 12 years ago

Yes, your update on github corrects the update issue bug

Actions #19

Updated by Stéphane Carré over 12 years ago

There's an other bug about "Time spent" in the "Log time" form. The field is flaged with unit comment "days by default" but the input value is taken into account as hours.

Actions #20

Updated by Tieu-Philippe Khim over 12 years ago

Thank you for the reply about this bug.

I'm looking for that, and I'll notice you when that will fixed

Actions #21

Updated by Mseuda Adeusm over 12 years ago

Hi, I've configured the unit of time at "day" but if i use the "Log Time" in the "Update" fonction of an issue, Redmine stay in "hours". It's good, if i use the "Log Time" near the "update" fonction.
I've join a picture, my English is poor.

Actions #22

Updated by Toni Smillie over 12 years ago

I have the same problem as Mseuda.
I've set the default to operate in days but when I click on update to update an issue and got to the Time Spent box which says days by default and enter time - it assumes the number I have entered is in hours. I did try and give it 2.0d using the d qualifier to signify days - but it didn't like that.

Actions #23

Updated by Tieu-Philippe Khim over 12 years ago

Oh! I'm going to look at it and fix that on github!
I'll let you know when that will be ready!

Actions #24

Updated by Tieu-Philippe Khim about 12 years ago

Sorry for the long time to update, I haven't got the time with my job...

I have done some change, and right now, that should work!

Actions #25

Updated by Alex Suprunevich about 12 years ago

Hi!

After installation, when trying to enter into any issue getting error, here is a log:

ActionView::TemplateError (undefined method `issue_heading' for #<ActionView::Base:0x7fd4e6e13198>) on line #7 of vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:
4:
5: <%= render :partial => 'action_menu' >
6:
7: <h2><
= l(:label_warning_risk) if @issue.has_risk? > <= issue_heading(@issue) ></h2>
8:
9: <div class="<
= @issue.css_classes > details">
10: <
= avatar(@issue.author, :size => "50") %>

vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:7:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47show46rhtml'
app/controllers/issues_controller.rb:117:in `show'
app/controllers/issues_controller.rb:116:in `show'
public/dispatch.fcgi:24

Rendering /home/r3si/www_testtracker/public/500.html (500 Internal Server Error)

I have Redmine 1.1.1.stable.

Could you help me?

Actions #26

Updated by Daniel Schwinger almost 12 years ago

(Same Post here https://github.com/spike008t/redmine_advanced_issues/issues/7)
On Redmine 1.4.0 ---
We become error (when we press "new ticket" - or then we open an ticket from the ticketlist)

ActionView::TemplateError (uninitialized constant ActionView::Base::CompiledTemplates::TabularFormBuilder) on line #1 of vendor/plugins/redmine_advanced_issues/app/views/issues/_attributes.rhtml:
1: <% fields_for :issue, @issue, :builder => TabularFormBuilder do |f| >
2:
3: &lt;div class="splitcontentleft"&gt;
4: <
if @issue.new_record? || @allowed_statuses.any? %>
vendor/plugins/redmine_advanced_issues/app/views/issues/_attributes.rhtml:1:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47_attributes46rhtml_locals_attributes_object'
app/views/issues/_form.html.erb:44
app/helpers/application_helper.rb:941:in `labelled_fields_for'
app/views/issues/_form.html.erb:1
vendor/plugins/redmine_advanced_issues/app/views/issues/_edit.rhtml:15:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47_edit46rhtml_locals_edit_object'
app/helpers/application_helper.rb:927:in `labelled_tabular_form_for'
vendor/plugins/redmine_advanced_issues/app/views/issues/_edit.rhtml:1:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47_edit46rhtml_locals_edit_object'
vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:119:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47show46rhtml'
app/controllers/issues_controller.rb:118:in `show'
app/controllers/issues_controller.rb:115:in `show'
thin (1.3.1) lib/thin/connection.rb:80:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in `catch'
thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in `process'
thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
thin (1.3.1) lib/thin/server.rb:159:in `start'
thin (1.3.1) lib/thin/controllers/controller.rb:86:in `start'
thin (1.3.1) lib/thin/runner.rb:185:in `send'
thin (1.3.1) lib/thin/runner.rb:185:in `run_command'
thin (1.3.1) lib/thin/runner.rb:151:in `run!'
thin (1.3.1) bin/thin:6
c:/webserver/ruby/bin/thin:19:in `load'
c:/webserver/ruby/bin/thin:19
Rendering C:/webserver/Redmine/public/500.html (500 Internal Server Error)

we insert tabular_form_builder.rb to ...\Redmine\lib\
from here: http://svn.ohwr.org/ohr-support/trunk/lib/tabular_form_builder.rb
(see http://redminecrm.com/issues/905 or https://github.com/ericpaulbishop/redmine_git_hosting/issues/135)

==> and now "New Ticket" works and we become new Error when we open a ticket from the ticket list.

ActionView::TemplateError (undefined method `preview_issue_path' for #&lt;ActionView::Base:0x875b788&gt;) on line #53 of vendor/plugins/redmine_advanced_issues/app/views/issues/_edit.rhtml:
50: <%= f.hidden_field :lock_version >
51: <
= submit_tag l(:button_submit) >
52: <
= link_to_remote l(:label_preview),
53: { :url => preview_issue_path(:project_id => @project, :id => @issue),
54: :method => 'post',
55: :update => 'preview',
56: :with => 'Form.serialize("issue-form")',
vendor/plugins/redmine_advanced_issues/app/views/issues/_edit.rhtml:53:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47_edit46rhtml_locals_edit_object'
app/helpers/application_helper.rb:927:in `labelled_tabular_form_for'
vendor/plugins/redmine_advanced_issues/app/views/issues/_edit.rhtml:1:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47_edit46rhtml_locals_edit_object'
vendor/plugins/redmine_advanced_issues/app/views/issues/show.rhtml:119:in `_run_rhtml_vendor47plugins47redmine_advanced_issues47app47views47issues47show46rhtml'
app/controllers/issues_controller.rb:118:in `show'
app/controllers/issues_controller.rb:115:in `show'
thin (1.3.1) lib/thin/connection.rb:80:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in `catch'
thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in `process'
thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
thin (1.3.1) lib/thin/server.rb:159:in `start'
thin (1.3.1) lib/thin/controllers/controller.rb:86:in `start'
thin (1.3.1) lib/thin/runner.rb:185:in `send'
thin (1.3.1) lib/thin/runner.rb:185:in `run_command'
thin (1.3.1) lib/thin/runner.rb:151:in `run!'
thin (1.3.1) bin/thin:6
c:/webserver/ruby/bin/thin:19:in `load'
c:/webserver/ruby/bin/thin:19
Rendering C:/webserver/Redmine/public/500.html (500 Internal Server Error)

What can we do ?

Thanks

Actions #27

Updated by Damien Couderc over 11 years ago

  • Assignee deleted (Damien Couderc)

Removed incorrect assignment.

Actions #28

Updated by Anthony HERBÉ over 11 years ago

In release 2.1.2 of Redmine, after fix "link_to_remote" method calls to "link_to" ones, the plugin load but, like some others plugins, "Missing template, responding with 404" error messages shows when accessing plugin configure page.

Do you have any idea to patch or fix it qeekly ?

Started GET "/settings/plugin/redmine_advanced_issues" for 127.0.0.1 at 2012-10-
18 19:19:27 +0200
Processing by SettingsController#plugin as HTML
  Parameters: {"id"=>"redmine_advanced_issues"}
  Current user: a-herbe (id=3)
  Rendered plugins/redmine_banner/app/views/settings/plugin.html.erb within layouts/admin (0.0ms)
Missing template, responding with 404
  Rendered common/error.html.erb within layouts/base (0.0ms)
  Rendered plugins/redmine_banner/app/views/banner/_project_body_bottom.html.erb (0.0ms)
  Rendered plugins/redmine_banner/app/views/banner/_body_bottom.html.erb (0.0ms)
  Rendered plugins/redmine_banner/app/views/banner/_after_top_menu.html.erb (0.0ms)
Completed 404 Not Found in 125ms (Views: 125.0ms | ActiveRecord: 0.0ms)

Thanks in advance and great job.

Actions #29

Updated by Go MAEDA almost 9 years ago

  • Related to Patch #5007: Time spent displayed in human readable format (hours minutes) added
Actions #30

Updated by Mischa The Evil over 6 years ago

  • Description updated (diff)
Actions #31

Updated by Mischa The Evil over 6 years ago

  • Related to Feature #877: ability to vary the units used to track time added
Actions #32

Updated by Hanyu Li about 6 years ago

This plugin doesn't work on Redmine 3.x

Actions

Also available in: Atom PDF