• Stan Hu's avatar
    Properly save suggestions in project exports · 26107e93
    Stan Hu authored
    Previously imports would fail if a merge request note included a
    suggestion with an
    `ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection`
    exception.
    
    This was happening because suggestions were listed as a descendant of
    merge requests, but this doesn't work because suggestions are directly
    associated with notes, not merge requests, and that association is lost.
    Rails also disallows creating intializing a has_many association through
    a different object.
    
    We fix this by making `suggestions` a child of `notes` within a merge
    request. This doesn't fix previously broken exported project exports,
    but new exports will work.
    
    Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65880
    26107e93
project.json 289 KB