redmine_xlsx_format_issue_exporter icon indicating copy to clipboard operation
redmine_xlsx_format_issue_exporter copied to clipboard

Custom field with full layout setting not exported

Open boki69 opened this issue 2 years ago • 6 comments

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:

  1. Create a custom field like in this picture with Full Width layout setting: kép
  2. Create an issue with this custom field: kép
  3. Filter issues like on the picture (If you check to show this column, it appears under the issue. Cannot select in Available Columns): kép
  4. Cannot set to export in modal window and it is not exported to downloaded xls. kép kép

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:

  1. Modal window: kép

  2. It is the last column in exported xls: kép

Best regards!

boki69 avatar Oct 18 '22 13:10 boki69

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😓

two-pack avatar Oct 18 '22 18:10 two-pack

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.

two-pack avatar Oct 21 '22 23:10 two-pack

@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 avatar Oct 24 '22 12:10 two-pack

@two-pack ,

I've tested these scenarios (issue and timelog parts of Redmine):

  1. Export only selected columns and the fulll layout custom field.
  2. Export all columns with the fulll layout custom field.
  3. Export datas when the fulll layout custom field was checked before I start export dialog

Everything is fine. Good job, thank you!

boki69 avatar Oct 24 '22 14:10 boki69

Thanks @boki69 ‼️ I'll merge this fix after more tests.

two-pack avatar Oct 24 '22 21:10 two-pack

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.

two-pack avatar Oct 29 '22 04:10 two-pack

I fixed this problem and merged. Thanks @boki69 for reporting it☺

two-pack avatar Nov 05 '22 05:11 two-pack