do_not_clear_category_on_project_change-2015-06-16-master.diff

Alexander Stehlik, 2015-06-16 15:00

Download (573 Bytes)

View differences:

app/models/issue.rb
491 491
      attrs['custom_fields'].select! {|c| editable_custom_field_ids.include?(c['id'].to_s)}
492 492
    end
493 493

  
494
    if (c_id = attrs.delete('category_id')) && safe_attribute?('category_id')
495
      self.category_id = c_id if project && project.issue_category_ids.include?(c_id.to_i)
496
    end
497

  
494 498
    # mass-assignment security bypass
495 499
    assign_attributes attrs, :without_protection => true
496 500
  end