Feature #1766
closedCustom fields should become addable to Spent Time list/report
Added by Mischa The Evil over 16 years ago. Updated about 9 years ago.
0%
Description
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.
Files
Related issues
Updated by Daniel N over 16 years ago
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?
Updated by Daniel N over 16 years ago
Duplicates #1692 - Jean-Philippe explained that currently only bolean and list types are available.
Updated by Mischa The Evil over 16 years ago
I took the liberty to follow-up the discussion of this issue on the forums to keep the issue as concrete as possible... :-)
Updated by Frédéric Moulins almost 15 years ago
Updated by Maciej Czub over 13 years ago
- /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.
Updated by Jamie Gruener over 13 years ago
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.
Updated by Sergey Startsev over 12 years ago
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.
Updated by Gabriel Pettier over 12 years ago
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
Updated by Bo Hansen about 12 years ago
- Assignee set to Jean-Philippe Lang
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:
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
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
Updated by Robert Barnebeck about 12 years ago
+1 It would be great to have the ability to show custom time entry fields in the Spent Time Details list!
Updated by Bob Pack almost 12 years ago
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.
Updated by Marc Neeley almost 12 years ago
+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.
Updated by Jean-Philippe Lang almost 12 years ago
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.
Updated by Jean-Philippe Lang almost 12 years ago
Issue custom fields are now available as columns in spent time details (r11174).
Updated by Bo Hansen almost 12 years ago
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
Updated by Daniel Felix almost 12 years ago
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.
Updated by Bob Pack almost 12 years ago
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 by Bo Hansen over 11 years ago
Updated patch for project custom fields in the criteria list for reports (merely an offset change, applies to 11447):
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
Much appreciated if it makes it into 2.3.0.
/Bo
Updated by Jean-Philippe Lang over 11 years ago
- Subject changed from Timelog custom-field columns should become addable to 'Spent Time'-details report. to Custom fields should become addable to Spent Time list/report
- Status changed from New to Closed
- Resolution set to Fixed
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.
Updated by Bo Hansen over 11 years ago
Thanks a lot, it's working nicely on trunk. Looking forward to next release :)
/Bo
Updated by delfo esposito over 11 years ago
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
Updated by Sergey Startsev over 11 years ago
it's true for every type of fcustom field.
For example, we use TEXT field for additional comments to a reports.
Updated by delfo esposito over 11 years ago
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?
Updated by Joel SCHAAL over 10 years ago
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 ?
Updated by Felix M over 9 years ago
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:
But I can't add my custom field (of type text) to the report:
Updated by Felix M over 9 years ago
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?
Updated by Toshi MARUYAMA over 9 years ago
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.
Updated by James Vreeken about 9 years ago
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...
Updated by Toshi MARUYAMA about 9 years ago
- Related to Feature #21061: Custom Field for Spent time added
Updated by Mischa The Evil over 7 years ago
- Related to Feature #25773: Add more custom fields types to criteria in time entries report added