プロジェクト

全般

プロフィール

Vote #66365

完了

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

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
開始日:
2010/01/18
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
15
issue_org_id:
4600
author_id:
4033
assigned_to_id:
0
comments:
2
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
6
ステータス-->[Closed]

説明

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-", "watcher_id"=>"=", "estimated_hours"=>"=", "cf_4"=>"=", "updated_on"=>">t-", "cf_6"=>"=", "priority_id"=>"=", "subject"=>"~", "tracker_id"=>"=", "done_ratio"=>"=", "due_date"=>""=", "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 #):
  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)

journals

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

The problem is with grouping.
--------------------------------------------------------------------------------
Fixed in r3333.
--------------------------------------------------------------------------------

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0