Project

General

Profile

Bug #468

Updated by liaham over 3 years ago

When the administrator creates a new project custom field and marks also the project type master classes she will get an internal server error. 

 The error occurs independent of further settings within the custom field form. 

 ``` ruby 
 Started POST "/custom_fields" for 192.168.3.41 at 2021-08-23 17:30:06 +0000 
 Processing by CustomFieldsController#create as HTML 
   Parameters: {"utf8"=>"✓", "authenticity_token"=>"1zjuj9l90i6ABt7jHHNQagaWipiokl/9Dux2fiZa9p85ayXbNSfSMV1LfBV3qeiWIkgplBHWuNfsBnTBMMQPXw==", "custom_field"=>{"field_format"=>"list", "name"=>"Vertraulichkeitsklassen", "description"=>"", "multiple"=>"0", "possible_values"=>"--Bitte auswählen--\r\nC1 - Öffentlich\r\nC2 - Kundenunterlagen\r\nC3 - Intern\r\nC4 - Vertraulich\r\nC5 - Geheim", "default_value"=>"--Bitte auswählen--", "url_pattern"=>"", "edit_tag_style"=>"", "is_required"=>"0", "is_filter"=>"1", "searchable"=>"0", "project_ids"=>["", "89", "86", "91", "88", "90", "87"], "visible"=>"1", "role_ids"=>[""]}, "commit"=>"Anlegen", "type"=>"ProjectCustomField"} 
   Current user: xmera_omnia (id=1) 
 Completed 500 Internal Server Error in 42ms (ActiveRecord: 16.9ms) 
  
 NoMethodError (undefined method `id' for nil:NilClass): 
  
 plugins/redmine_project_types/lib/project_types/extensions/project_custom_field_patch.rb:52:in `new_project?' 
 plugins/redmine_project_types/lib/project_types/overrides/project_custom_field_patch.rb:41:in `validate_custom_value' 
 app/models/custom_field.rb:314:in `validate_field_value' 
 app/models/custom_field.rb:159:in `validate_custom_field' 
 app/controllers/custom_fields_controller.rb:48:in `create' 
 lib/redmine/sudo_mode.rb:61:in `sudo_mode' 
 plugins/redmine_dmsf/lib/redmine_dmsf/webdav/custom_middleware.rb:56:in `call' 
 ``` 

Back