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