I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Bug #2359

Extended fields plugin breaks PDF export

Added by Sergey B almost 5 years ago. Updated about 3 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
29 Jan 2015
Due date:
% Done:

90%

Redmine version:
External issue:

Description

PDF export of issue list doesn’t work after installation of extended fields plugin.

Environment info

Environment:
  Redmine version                2.5.1.stable
  Ruby version                   1.9.3-p231 (2012-05-25) [i386-mingw32]
  Rails version                  3.2.17
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.8
  Git                            1.9.0
  Filesystem                     
Redmine plugins:
  extended_fields                0.2.3
  redmine_all_files              0.0.3
  redmine_codebutton             0.0.1
  redmine_screenshot_paste       2.1.0
  redmine_tags                   2.1.0
  sidebar_hide                   0.0.7

Logs

NoMethodError (undefined method `find_custom_field_template' for #<IssuesController:0x3704490>):
  lib/redmine/export/pdf.rb:302:in `block in calc_col_width'
  app/helpers/issues_helper.rb:29:in `block in issue_list'
  app/helpers/issues_helper.rb:25:in `each'
  app/helpers/issues_helper.rb:25:in `issue_list'
  lib/redmine/export/pdf.rb:300:in `calc_col_width'
  lib/redmine/export/pdf.rb:428:in `issues_to_pdf'
  app/controllers/issues_controller.rb:93:in `block (2 levels) in index'
  app/controllers/issues_controller.rb:86:in `index'

extended_fields.zip - Patched 0.23 version (52.9 KB) Jacek Pasternak, 24 Mar 2015 10:06

fix.patch View - Patches for 0.2.3 (2.38 KB) Jacek Pasternak, 04 Oct 2016 08:40


Related issues

Related to Extended Fields - Bug #2261: issues PDF view and descriptions Incomplete 04 Nov 2013
Related to Extended Fields - Bug #2098: Failure in XLS Export (undefined method `find_custom_field_template' for #<XlsExportController) In Progress 07 Sep 2012
Related to Extended Fields - Bug #1936: Undefined method `find_custom_field_template' Closed 06 Jan 2012 01 Feb 2012
Duplicates Extended Fields - Bug #2318: Issues as pdf In Progress 25 Jun 2014

Associated revisions

Revision 124 (diff)
Added by Andriy Lesyuk about 3 years ago

Explicitly include ExtendedFieldsHelper (#2318, #2359, #2098)

History

#1 Updated by Sergey B over 4 years ago

Any ideas how to fix it?

#3 Updated by Sergey B over 4 years ago

Jacek Pasternak wrote:

You can find quick-fix here: http://projects.andriylesyuk.com/issues/2098#note-22 and here http://projects.andriylesyuk.com/issues/2098#note-24

After applying this fix PDF export fails with Undefined method 'link_to’.

#4 Updated by Jacek Pasternak over 4 years ago

I’ve tested it on Redmine 2.5.3. Maybe the next problem is with Redmine 2.5.1. Try attached version.

#5 Updated by Sergey B over 4 years ago

The difference was in extended_issues_controller_patch.rb and extended_fields_helper_patch.rb. After I copied your version, I got the following:

NoMethodError (undefined method `link_to' for #<IssuesController:0x36618a8>):
  lib/redmine/field_format.rb:157:in `block in formatted_value'
  lib/redmine/field_format.rb:157:in `map'
  lib/redmine/field_format.rb:157:in `formatted_value'
  lib/redmine/field_format.rb:146:in `formatted_custom_value'
  app/helpers/application_helper.rb:187:in `format_object'
  lib/redmine/export/pdf.rb:302:in `block in calc_col_width'
  app/helpers/issues_helper.rb:29:in `block in issue_list'
  app/helpers/issues_helper.rb:25:in `each'
  app/helpers/issues_helper.rb:25:in `issue_list'
  lib/redmine/export/pdf.rb:300:in `calc_col_width'
  lib/redmine/export/pdf.rb:428:in `issues_to_pdf'
  app/controllers/issues_controller.rb:93:in `block (2 levels) in index'
  app/controllers/issues_controller.rb:86:in `index'

I suppose, in 2.5.3 there must be a method link_to in IssuesController which is absent in 2.5.1.

#6 Updated by Jacek Pasternak over 4 years ago

It’s defined in [Redmine root]\lib\redmine\views\other_formats_builder.rb (in 2.5.3 of course). If you don’t have it, maybe it’s time to upgrade.

#7 Updated by Andriy Lesyuk about 4 years ago

  • Status changed from New to Open
  • Assignee set to Andriy Lesyuk
  • Target version set to 0.2.4

#8 Updated by Andriy Lesyuk about 3 years ago

#9 Updated by Andriy Lesyuk about 3 years ago

  • Related to Bug #2261: issues PDF view and descriptions added

#10 Updated by Andriy Lesyuk about 3 years ago

  • Related to Bug #2098: Failure in XLS Export (undefined method `find_custom_field_template' for #<XlsExportController) added

#11 Updated by Andriy Lesyuk about 3 years ago

  • Related to Bug #1936: Undefined method `find_custom_field_template' added

#12 Updated by Andriy Lesyuk about 3 years ago

Sergey, your patched version contains Polish locale. I wonder, if you would let me to include it into the repository? Is the translation complete and fine to be published?

#13 Updated by Andriy Lesyuk about 3 years ago

  • Status changed from Open to In Progress
  • % Done changed from 0 to 90

I think this issue (and similar) should be fixed with r124. Please check and let me know.

#14 Updated by Sergey B about 3 years ago

Andrey, the patch is not mine. It’s attached by Jacek Pasternak.

#15 Updated by Andriy Lesyuk about 3 years ago

Sergey, oh. Right. Jacek, so what about the Polish locale?

#16 Updated by Jacek Pasternak about 3 years ago

Andriy Lesyuk wrote:

Sergey, oh. Right. Jacek, so what about the Polish locale?

I’m using this translations in production environment and Polish is my native language, so ... they are ready to publish (plase do this). It’s based on English translatioins (I don’t knon Russian), but should be ok.

Btw. is there any chance to make Extedted Fileds plugin working in Redmine 3.0.x? It’s causing bugs in issues list.

#17 Updated by Andriy Lesyuk about 3 years ago

Jacek Pasternak wrote:

Btw. is there any chance to make Extedted Fileds plugin working in Redmine 3.0.x? It’s causing bugs in issues list.

Working on this right now. It’s quite possible, that the latest version in the repository already works fine under Redmine 3.0. Can’t guarantee for the moment though...

You can share bugs in the issue list in #2365.

And, thanks for the Polish translation - will use it.

#18 Updated by Jacek Pasternak about 3 years ago

Andriy Lesyuk wrote:

Jacek Pasternak wrote:
Working on this right now. It’s quite possible, that the latest version in the repository already works fine under Redmine 3.0. Can’t guarantee for the moment though...

It’s not fixed yet. I’m attching my patch to several bugs found in 0.2.3. Some are fixed in nerwest release and some not. It’s mostly based on my patched version which is attached to this issue. Hope it will be useful.

#19 Updated by Andriy Lesyuk about 3 years ago

Jacek Pasternak wrote:

It’s not fixed yet. I’m attching my patch to several bugs found in 0.2.3. Some are fixed in nerwest release and some not. It’s mostly based on my patched version which is attached to this issue. Hope it will be useful.

Are you saying, that you are still getting undefined method `find_custom_field_template'? Or now there are errors related to nil?

#20 Updated by Jacek Pasternak about 3 years ago

Andriy Lesyuk wrote:

Are you saying, that you are still getting undefined method `find_custom_field_template'? Or now there are errors related to nil?

No. Just this patch worked for me. Maybe some issues was handled in different way and parts of this patch are not necessary now. I’ve tested current version just against “double # column” bug. Waiting for fixing this to make other testing.

Also available in: Atom PDF

Terms of use | Privacy policy