プロジェクト

全般

プロフィール

Vote #63738

完了

Custom fields should become addable to Spent Time list/report

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

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

0%

予定工数:
category_id:
13
version_id:
60
issue_org_id:
1766
author_id:
1565
assigned_to_id:
1
comments:
36
status_id:
5
tracker_id:
2
plus1:
7
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Like the subject states timelog.custom_field columns should become addable to the reports @ /projects/xxxprojectxxx/timelog/details.

They are available already as filters in the 'Spent Time'-report view.


journals

This would greatly improve the usability of the timelog feature. I also noticed that only "boolean"-type custom fields appear as filter in the drop-down for Spent Time reports. Could you confirm this? Or do all your custom fileds are available?
--------------------------------------------------------------------------------
Duplicates #1692 - Jean-Philippe explained that currently only bolean and list types are available.
--------------------------------------------------------------------------------
I took the liberty to "follow-up the discussion":http://www.redmine.org/boards/1/topics/show/2040 of this issue on the forums to keep the issue as concrete as possible... :-)
--------------------------------------------------------------------------------
The following patch allows to add comments to the list of fields : #3117.

To add up to 5 fields to the report : #4705.

Custom fields are already available, so the feature should be complete.
--------------------------------------------------------------------------------
There are many gaps (mainly in the aspects of custom_fields) in the functionality of:
* /projects/foo/timelog/details
* /projects/foo/timelog/report
* /time_entries
* /time_entries/report

Key function is to display the custom fields in the detailed views and reports. It's now only partially implemented in the timelog CSV export feature. There are also requests for filtering by custom fields in details and grouping by custom fields in reports.

It would be nice if these gaps in functionality have been filled.
--------------------------------------------------------------------------------
Just to be clear, only _some_ types of custom fields are available in the Report view. Specifically, text fields are not available, and I understand why, but that doesn't help folks who would like to see the data in Redmine (I stopped using Excel for a reason, folks!). Ideally, you could add additional fields to the Details view.
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
Still waiting for the solution!
For example, the is no text field for a really full report and this is why I created a custom one. But to view this mostly meaningful for me information, I must go to the report editing page - anoing thing.
--------------------------------------------------------------------------------
I did a patch to my redmine instance to allow Project custom fields (string and bool), it was done on an older version of redmine, i put it in the last git, but untested on this version.

https://github.com/tshirtman/redmine/commit/257b08e1359a19bc70cc555fdc7b8c6b8d842743
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
Could not get Gabriel's patch to work on 2.0.3, but here's one adding custom project fields of type list and bool to the time report view:
<pre>
index 80e6052..28c2ed8 100644
--- a/lib/redmine/helpers/time_report.rb
+++ b/lib/redmine/helpers/time_report.rb
@@ -157,6 +157,13 @@ module Redmine
:label => cf.name}
end

+ # add project custom fields
+ ProjectCustomField.find(:all).select {|cf| %w(list bool).include? cf.field_format }.each do |cf|
+ @available_criteria["cf_#{cf.id}"] = {:sql => "(SELECT c.value FROM #{CustomValue.table_name} c WHERE c.custom_field_id = #{cf.id} AND c.customized_type = 'Project' AND c.customized_id = #{TimeEntry.table_name}.project_id ORDER BY c.value)",
+ :format => cf.field_format,
+ :label => cf.name}
+ end
+
@available_criteria
end
end
</pre>

This patch is actually well in line with issue #8161 adding project custom fields for issue queries. Could this patch go into the upcoming 2.1 release?

Best regards,
Bo
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1 It would be great to have the ability to show custom time entry fields in the Spent Time Details list!
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Will this change also include Issue custom fields? This would make a great difference for my company.

If you need a use-case, consider this organization, which seems like it should be somewhat common and very powerful- we have issues/tasks that are organized according to component. The components (projects) are a flat list. We then get paid to make specific updates to different components, depending on the customers' needs/wants. So, a particular customer may want Components A,B, and C to get updated, with changes identified in Tasks X,Y,Z (members of A,B, and C respectively). That is a simple case, because of course there are many components, and many tasks, and many customers, but you should see where I'm going. It's very useful (and important) for me to be able to go to the Spent Time Report and identify what work was done for a particular customer on a particular contract. I can't do that today. ALSO, please note: I don't want my employees to enter the contract/client on their spent time report- I specifically want this data to be entered during the planning phase as a custom field on the issue, so upper management can have visibility to progress through the "All Issues" querying system. I have a different system to track time spent on contracts.
--------------------------------------------------------------------------------
+1 in what Bob Pack is saying here. I too see requests by external customers and internal managers wanting to see Estimated Time and % Complete shown next to Spent Time in the reports. This essentially becomes the Gantt in report form rather than graphic form. They are already seeing issues in the reports, just not various key fields.
--------------------------------------------------------------------------------
Bob Pack wrote:
> Will this change also include Issue custom fields?

You will be able to filter the spent time list/report by issue custom fields.
--------------------------------------------------------------------------------
Issue custom fields are now available as columns in spent time details (r11174).
--------------------------------------------------------------------------------
Looks good in current trunk - much requested feature to get the filters in the report view.
Any chance to see the project custom fields added to the list of columns also?

Thanks in advance,
Bo
--------------------------------------------------------------------------------
Bo Hansen wrote:
> Any chance to see the project custom fields added to the list of columns also?

This is also requested in another issue #1766.

--------------------------------------------------------------------------------
Thanks for the work on this feature! It will be a huge help, and you can bet that as soon as 2.3 is released I will be upgrading. I may try out the trunk for the first time based on our need for this. This gives me another dimension to sort the data over, which I sorely have needed.

Marc Neeley wrote:
> +1 in what Bob Pack is saying here. I too see requests by external customers and internal managers wanting to see Estimated Time and % Complete shown next to Spent Time in the reports. This essentially becomes the Gantt in report form rather than graphic form. They are already seeing issues in the reports, just not various key fields.

Marc - you are saying something slightly different from what I was saying. I was talking specifically about Custom Fields, and you are talking about built-in Issue fields. I can see some value in what you are saying, although I'm not sure it will work exactly as you want. Personally, I'd like to see an interface where I can look at the projected work for the month (factoring in "Estimated Time" on a month basis, similar to how it's done in Spent Time reports). Maybe that's what you want too? It won't work that way in the current structures, though, because Spent Time will only report on items that have had time spent on them (of course).

If that isn't your goal, maybe adding "Estimated Time" and "% Complete" in the "Overall Issues" filter view will give you some of you want.
--------------------------------------------------------------------------------
Updated patch for project custom fields in the criteria list for reports (merely an offset change, applies to 11447):
<pre>
index 4798fe6..0615314 100644
--- a/lib/redmine/helpers/time_report.rb
+++ b/lib/redmine/helpers/time_report.rb
@@ -141,6 +141,13 @@ module Redmine
:label => cf.name}
end

+ # add project custom fields
+ ProjectCustomField.find(:all).select {|cf| %w(list bool).include? cf.field_format }.each do |cf|
+ @available_criteria["cf_#{cf.id}"] = {:sql => "(SELECT c.value FROM #{CustomValue.table_name} c WHERE c.custom_field_id = #{cf.id} AND c.customized_type = 'Pr
+ :format => cf.field_format,
+ :label => cf.name}
+ end
+
@available_criteria
end
end
</pre>

Much appreciated if it makes it into 2.3.0.

/Bo
--------------------------------------------------------------------------------
Bo Hansen wrote:
> Updated patch for project custom fields in the criteria list for reports (merely an offset change, applies to 11447):
> [...]
>
> Much appreciated if it makes it into 2.3.0.

Project custom fields added to the spent time report in r11459.
--------------------------------------------------------------------------------
Thanks a lot, it's working nicely on trunk. Looking forward to next release :)

/Bo
--------------------------------------------------------------------------------
hi guys

is this true only for project's custom fields of type list?
i don't see my project custom fields of type TEXT in the options for time spent report

thanks

Delfo
--------------------------------------------------------------------------------
it's true for every type of fcustom field.
For example, we use TEXT field for additional comments to a reports.
--------------------------------------------------------------------------------
more details about my issue:
Report working:

/projects/cdgprojects/time_entries/report?utf8=%E2%9C%93&criteria[]=project&period_type=2&from=2013-06-01&to=2013-06-26&columns=month&criteria[]=cf_99

where cf_99 is type LIST

if i use cf_100 which is TEXT it is just ignored

anything in global settings to set maybe?

--------------------------------------------------------------------------------
It seems I do not see our custom field (of type Integer) in the details of the time entries (when I access @/projects/foo/issues/42/time_entries@)
Did I miss something in my configuration (/ how I use this feature) or has there been a regression on this topic since 2.3.0 ?

--------------------------------------------------------------------------------
I agree with Joel: If this was working in 2.3.0, then there has been a regression.
I'm using 3.0.3.stable, and I'm trying to add an Issue's Custom Field of type text (called PSP) to the time report (time_entries/report).

It's possible to filter by my custom field:
!a.png!

But I can't add my custom field (of type text) to the report:
!b.png!
--------------------------------------------------------------------------------
I get the desired behavior (i.e. add a string custom field to the report) if I make the following changes:

in lib/redmine/field_format.rb, in class StringFormat add:
@def group_statement(custom_field)
order_statement(custom_field)
end@

in lib/redmine/helpers/time_report.rb
change @custom_fields.select {|cf| %w(list bool string).include?(cf.field_format) && !cf.multiple?}.each do |cf|@
to @custom_fields.select {|cf| %w(list bool).include?(cf.field_format) && !cf.multiple?}.each do |cf|@

But I don't understand why only list and bool had @group_statement@ in field_format.rb and were treated differently in time_report.rb. Does my change have any unforseen consequences?
--------------------------------------------------------------------------------
Felix M wrote:
> I get the desired behavior (i.e. add a string custom field to the report) ...

I don't know it is related or not, I created issue #19121.
--------------------------------------------------------------------------------
I am also having this problem... we have a custom field called "Job Number" we would like to be able to create a report thru the tool that exports the week with time spent along with the job number... Its not working...

I tried what Felix M said to do by editing
lib/redmine/field_format.rb and lib/redmine/helpers/time_report.rb but I still can't get custom fields to show up in the list on the report tab...
--------------------------------------------------------------------------------

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

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


related_issues

relates,New,1692,Enable time-tracking additional fields in reports filters
relates,New,3117,Add the possibility to select the comment field to /timelog/report
relates,New,4705,Allow selection of up to five fields in timelog report
relates,Closed,6972,Custom fields in timelog report
relates,Closed,21061,Custom Field for Spent time
relates,New,25773,Add more custom fields types to criteria in time entries report
duplicates,Closed,6797,custom fields missing in time detail
duplicates,Closed,7634,Report on project custom field in time spent report

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

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

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

いいね!0
いいね!0