プロジェクト

全般

プロフィール

Vote #75206

未完了

Time tracking : duration since last update on issue

Admin Redmine さんが約4年前に追加. 約4年前に更新.

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

0%

予定工数:
category_id:
13
version_id:
0
issue_org_id:
16821
author_id:
16283
assigned_to_id:
0
comments:
1
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Here is a common workflow : issue is new, then assigned to someone, then resolved by the assignee.

The idea is to know how much time has passed since last issue update (only shown if duration is < 24h) to help user to track their spent time on the issue : we actually look at last issue update date to do this : a hint just next to the "Spent time" field should be welcome :

!redmine-time-tracking.png!

Maybe a plugin already do this, but I think it should be part of base redmine feature set.


journals

Just done it :

Some addition to app/views/issues/_edit.html.erb (4 first lines are from the original template) :
<pre>
<% if User.current.allowed_to?(:log_time, @project) %>
<fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
<%= labelled_fields_for :time_entry, @time_entry do |time_entry| %>
<div class="splitcontentleft">
<p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %>
<span> - Last change : </span><span id="time_elapsed_since_last_update"><%= distance_of_time_in_words(Time.now, @issue.updated_on) %></span> <a id="time_elapsed_since_last_update_link" title="Refresh elapsed time" href="#" onclick="reloadTimeElapsedSinceLastUpdate();return false;">(reload)</a>
<script>
hookedShowAndScrollTo = showAndScrollTo;
reloadTimeElapsedSinceLastUpdate= function() { $("#time_elapsed_since_last_update").load('/issues/<%= @issue.id %>.json?key=<%= User.current.api_key %>', function(data){ var json = JSON.parse(data); $("#time_elapsed_since_last_update").text(json.issue["label_updated_time"]); } ); }
showAndScrollTo = function(toShow, toScroll) { reloadTimeElapsedSinceLastUpdate(); hookedShowAndScrollTo(toShow, toScroll); }
</script>
</pre>

and one line to app/views/issues/show.api.rsb :

<pre>
api.label_updated_time distance_of_time_in_words(Time.now, @issue.updated_on)
</pre>
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリTime tracking_13 にセット

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

いいね!0
いいね!0