Time entries report to CSV - missing issue name
Added by Martin K over 5 years ago
Hello,
is it possible to add issue name (you can see it under Projects->Spent time->Report webpage) to CSV export? There is only issue number in exported CSV. May be this could be CSV export option ...
Thanks.
Replies (7)
RE: Time entries report to CSV - missing issue name
-
Added by Egor N over 5 years ago
Hello, Martin!
I have the same issue. Could you say, have you found a solution?
RE: Time entries report to CSV - missing issue name
-
Added by Martin K over 5 years ago
Hello,
sorry I just checked source codes very quickly, I am not Ruby programmer so I didn't find any quick solution. May be I will check again when I have more time to study it deeper.
I think some Ruby programmer would do it faster.
RE: Time entries report to CSV - missing issue name
-
Added by Marek Stepan about 5 years ago
Hello i have a similiar issue , i would like to add Description columnt of Project to the Report view in Timelog / csv export .Anybody found a solutiuon ? cant wrap my head around how redmine ruby is build
RE: Time entries report to CSV - missing issue name
-
Added by Bernhard Rohloff about 5 years ago
Martin K wrote:
Hello,
is it possible to add issue name (you can see it under Projects->Spent time->Report webpage) to CSV export? There is only issue number in exported CSV. May be this could be CSV export option ...Thanks.
It's possible to add the description to the issue in CSV export BUT it affects other parts of Redmine which also use the same method.
You can add it in the method format_object
in app/helpters/application_helper.rb
somewhere around line 254.
#changing this line object.visible? && html ? link_to_issue(object) : "##{object.id}" #to something like this object.visible? && html ? link_to_issue(object) : "##{object.id} #{object.subject}" #should do the trick
Marek Stepan wrote:
Hello i have a similiar issue , i would like to add Description columnt of Project to the Report view in Timelog / csv export .Anybody found a solutiuon ? cant wrap my head around how redmine ruby is build
This is tricky to achieve since the columns of the report are also used as the sort criteria of the report. One could try it with the above approach but I don't think it would not work very well.
RE: Time entries report to CSV - missing issue name
-
Added by Marek Stepan about 5 years ago
Hello , thanks for the feedback , i changed it as follows but it didnt add description to the dropdown list and i havent seen any other change elsewhere .
Is there no possibility to add it directly via some global data variable into the export code / view code ?
EDIT::
Am i correct to think this is the blueprint for a report object (reports_controller.rb ) ? if so does it not need a description variable/object to later be accesed by feed to the application_helper.rb method ?
changed.PNG (77.4 KB) changed.PNG | |||
report_controller.PNG (63.9 KB) report_controller.PNG |
RE: Time entries report to CSV - missing issue name
-
Added by Bernhard Rohloff about 5 years ago
Marek Stepan wrote:
Hello , thanks for the feedback , i changed it as follows but it didnt add description to the dropdown list and i havent seen any other change elsewhere .
Is there no possibility to add it directly via some global data variable into the export code / view code ?
No of course it doesn't. It just a possibility to add the description to the project name. As I mentioned above. The columns aren't only for details but for sorting the spent time in a specific order. If you would add a description option to the list the whole report would get sorted by your project and the description. I'm not sure how the end result would look like.
Here I have changed the columns for issue and project so that they get exported with their project description and issue subject. It doesn't get shown in the browser as the project is formatted as link instead.
EDIT::
Am i correct to think this is the blueprint for a report object (reports_controller.rb ) ? if so does it not need a description variable/object to later be accesed by feed to the application_helper.rb method ?
Ruby on Rails the framework Redmine is built on is structured after the MVC Pattern so your controller generates a report out of data objects (models)
and shows them to you through a view template. The app folder is structured like this, too. The controller is also responsible for the business logic of the application.
timelog_report.png (140 KB) timelog_report.png |
RE: Time entries report to CSV - missing issue name
-
Added by Marek Stepan about 5 years ago
Thank you , this worked . I also added
html ? link_to_project(object)+ " - " +object.description.to_s: "#{object.to_s} #{object.description}"
to add it to the Details view beside the link to the project and removed the collumn description
which you helped me to add in https://www.redmine.org/boards/2/topics/56839?r=56868#message-56868 as this line gives me the result i desire for exporting and viewing in details and report window without the added column ! .
Thank you Again Bernhard you are the Best !