Actions
Defect #4600
closedIssue list export to PDF - NoMethodError (undefined method `cf_3' for #XXXX) when issues sorted by a custom field
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 -
- Install RC 1 of 0.9 from RubyForge
- Create several issues
- Create a custom field
- View the issue list
- Group the results by that custom field
- Export the issue list to PDF
- 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