Defect #15571
closedinternal error after deleting custom field
0%
Description
Hello,
I had done some tests with redmine api and custom fields and after that I have problems viewing issues in project where the deleted custom field was used.
Steps:
1. create custom field (text) for project X
2. update one issue in project X and set the custom field
3. 3 times used apikey to change custom field value in this issue
4. deleted custom field
5. now all issues in project x are giving me internal error. other projects work fine
logs when trying to check any issue in project X:
Started GET "/issues/1175" for 192.168.76.97 at Fri Nov 29 11:19:11 +0100 2013
Processing by IssuesController#show as HTML
Parameters: {"id"=>"1175"}
Current user: admin (id=1)
Rendered issues/_action_menu.html.erb (4.5ms)
Rendered issues/show.html.erb within layouts/base (22.5ms)
Completed 500 Internal Server Error in 187ms
ActionView::Template::Error (undefined method `to_i' for [nil]:Array):
64: rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? (link_to l_hours(@issue.total_spent_hours), {:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue}) : "-"), :class => 'spent-time'
65: end
66: end %>
67: <%= render_custom_fields_rows(@issue) %>
68: <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
69: </table>
70:
lib/redmine/custom_field_format.rb:55:in `format_as_version'
lib/redmine/custom_field_format.rb:36:in `send'
lib/redmine/custom_field_format.rb:36:in `format'
lib/redmine/custom_field_format.rb:101:in `format_value'
app/helpers/issues_helper.rb:160:in `render_custom_fields_rows'
app/helpers/issues_helper.rb:158:in `each'
app/helpers/issues_helper.rb:158:in `render_custom_fields_rows'
app/views/issues/show.html.erb:67:in `_e7529ca14bc47e33f631b49fe65d7c81'
app/controllers/issues_controller.rb:119:in `show'
app/controllers/issues_controller.rb:116:in `show'
I am working on redmine 2.2.4 on ubuntu server
Updated by Jean-Philippe Lang about 12 years ago
- Status changed from New to Needs feedback
Your stack trace looks strange, and there's no way Redmine::CustomFieldFormat.format_value can be called with an array from CustomFieldsHelper#show_value in 2.2.4. Do you have any plugins or local changes?
Updated by Jean-Philippe Lang about 12 years ago
- Status changed from Needs feedback to Closed
- Resolution set to No feedback