redmine_xlsx_format_issue_exporter
redmine_xlsx_format_issue_exporter copied to clipboard
Custom field with full layout setting not exported
Hi two-pack!
First of all, I have to thank you for this great plugin!
I think, I found a bug with Redmine 5.
Test scenario for reproduce the wrong behaviour:
- Create a custom field like in this picture with Full Width layout setting:
- Create an issue with this custom field:
- Filter issues like on the picture (If you check to show this column, it appears under the issue. Cannot select in Available Columns):
- Cannot set to export in modal window and it is not exported to downloaded xls.
I make a modification in app/views/hooks/_xlsx_export_dialog_on_issues_index.erb after line 20, and it works for me:
<% @query.available_columns.each do |c| if !c.inline? and !['last_notes','description'].include?(c.name.to_s) %> <label><%= check_box_tag "#{c.name.to_s}", '1', @query.has_column?(c.name) %> <%= c.custom_field.name %></label><br /> <% end %> <% end %>
And the end of line 17 and 19 insert this code:
<br />
Test results:
-
Modal window:
-
It is the last column in exported xls:
Best regards!
Thank you for reporting the issue. I think this problem is like following csv exporting bug of Redmine. https://www.redmine.org/issues/33169 So how to fix it is like that too.
Can you make a pull request? I don't have enough time to fix it now😓
We have begun to correct this problem. I am trying to fix it to work with Redmine 4.2.x or later, as the process for older versions is getting in the way and making it difficult to fix. This is going to take long time as it is going to require a major fix.
@boki69 , I have fixed this issue and pushed it to the next branch. But I have not yet fully tested it, but we encourage you to give it a try. https://github.com/two-pack/redmine_xlsx_format_issue_exporter/tree/issue98
@two-pack ,
I've tested these scenarios (issue and timelog parts of Redmine):
- Export only selected columns and the fulll layout custom field.
- Export all columns with the fulll layout custom field.
- Export datas when the fulll layout custom field was checked before I start export dialog
Everything is fine. Good job, thank you!
Thanks @boki69 ‼️ I'll merge this fix after more tests.
I'm testing it, and got two bugs,
- Fail to export user list.
- Some unessesary headers on timelog report export.
I continue to fix them and test it.
I fixed this problem and merged. Thanks @boki69 for reporting it☺