Feature #16941 » do_not_clear_category_on_project_change.diff
| app/models/issue.rb | ||
|---|---|---|
| 468 | 468 | 
          attrs['custom_fields'] = attrs['custom_fields'].reject {|c| !editable_custom_field_ids.include?(c['id'].to_s)}
   | 
| 469 | 469 | 
    end  | 
| 470 | 470 | |
| 471 | 
        if (c_id = attrs.delete('category_id')) && safe_attribute?('category_id')
   | 
|
| 472 | 
    self.category_id = c_id if project && project.issue_category_ids.include?(c_id.to_i)  | 
|
| 473 | 
    end  | 
|
| 474 | ||
| 471 | 475 | 
    # mass-assignment security bypass  | 
| 472 | 476 | 
    assign_attributes attrs, :without_protection => true  | 
| 473 | 477 | 
    end  |