Project

General

Profile

Actions

Defect #4600

closed

Issue list export to PDF - NoMethodError (undefined method `cf_3' for #XXXX) when issues sorted by a custom field

Added by Andrew Leaf about 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
Start date:
2010-01-18
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When attempting to export issues to a PDF that are sorted by a custom field, an Internal 500 Server error is displayed to the user. The production.log shows that an undefined method being the cause.

Environment -

Found in RC1 0.9, Ruby 1.8.6, Rails 2.3.5, Rack 1.0.1, mysql
User language is English.

Steps to reproduce -

  1. Install RC 1 of 0.9 from RubyForge
  2. Create several issues
  3. Create a custom field
  4. View the issue list
  5. Group the results by that custom field
  6. Export the issue list to PDF
  7. Observe the Internal server 500 error is displayed to the user

Note - Log file excerpted below.

Expected Result -

User should be able to export issues to PDF when grouped by a custom field.

Processing IssuesController#index (for XXXXXXXX at 2010-01-18 10:57:58) [POST]
  Parameters: {"project_id"=>"administration", "group_by"=>"cf_3", "set_filter"=>"1", "fields"=>["status_id"], "action"=>"index", "authenticity_token"=>"XXXXXXXXXXXXX=", "operators"=>{"start_date"=>"<t+", "created_on"=>">t-", "watcher_id"=>"=", "estimated_hours"=>"=", "cf_4"=>"=", "updated_on"=>">t-", "cf_6"=>"=", "priority_id"=>"=", "subject"=>"~", "tracker_id"=>"=", "done_ratio"=>"=", "due_date"=>"<t+", "assigned_to_id"=>"=", "author_id"=>"=", "status_id"=>"o"}, "controller"=>"issues", "values"=>{"start_date"=>[""], "created_on"=>[""], "watcher_id"=>["me"], "estimated_hours"=>[""], "cf_4"=>[""], "updated_on"=>[""], "cf_6"=>[""], "priority_id"=>["10"], "subject"=>[""], "tracker_id"=>["2"], "done_ratio"=>[""], "due_date"=>[""], "assigned_to_id"=>["me"], "author_id"=>["me"], "status_id"=>["10"]}, "query"=>{"column_names"=>["tracker", "status", "priority", "subject", "author", "assigned_to", "updated_on"]}, "_"=>""}
Rendering issues/index.rhtml
Completed in 166ms (View: 116, DB: 18) | 200 OK [http://cXXXXXXXXXXX/issues?set_filter=1]

Processing IssuesController#index to pdf (for 207.250.17.230 at 2010-01-18 10:58:00) [GET]
  Parameters: {"format"=>"pdf", "project_id"=>"administration", "action"=>"index", "controller"=>"issues"}

NoMethodError (undefined method `cf_3' for #<Issue:0xb6ffa4f4>):
  lib/redmine/export/pdf.rb:149:in `send'
  lib/redmine/export/pdf.rb:149:in `issues_to_pdf'
  lib/redmine/export/pdf.rb:148:in `each'
  lib/redmine/export/pdf.rb:148:in `issues_to_pdf'
  app/controllers/issues_controller.rb:79:in `index'
  app/controllers/issues_controller.rb:75:in `index'

Rendering /XXXXXXXXX/redmine/public/500.html (500 Internal Server Error)
Actions #1

Updated by Andrew Leaf about 14 years ago

Original description and bug subject should have used the word "Grouped" and not "sorted".

The problem is with grouping.

Actions #2

Updated by Jean-Philippe Lang about 14 years ago

  • Status changed from New to Closed
  • Target version set to 0.9.1
  • Resolution set to Fixed

Fixed in r3333.

Actions

Also available in: Atom PDF