diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-11 04:43:52 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-11 04:50:42 +0300 |
commit | 26107e93548c0b9dee7df0a7e4003f1d55be1975 (patch) | |
tree | 350b9cc7aac3c0b7a05afd907d2d4d4fbc09d6f2 /changelogs | |
parent | ea671dec7f9db06c1d45ddd1536c1af194de8f62 (diff) |
Properly save suggestions in project exports
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
Diffstat (limited to 'changelogs')
-rw-r--r-- | changelogs/unreleased/sh-fix-import-export-suggestions.yml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/changelogs/unreleased/sh-fix-import-export-suggestions.yml b/changelogs/unreleased/sh-fix-import-export-suggestions.yml new file mode 100644 index 00000000000..4b15fc3858f --- /dev/null +++ b/changelogs/unreleased/sh-fix-import-export-suggestions.yml @@ -0,0 +1,5 @@ +--- +title: Properly save suggestions in project exports +merge_request: 31690 +author: +type: fixed |