-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pro 6416 missing fields #76
Conversation
fd28dcd
to
eef7fe6
Compare
eef7fe6
to
f13c0fa
Compare
recursions++; | ||
if (recursions >= MAX_RECURSION) { | ||
return related; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we need this recursion limit since we parse each type schema only once.
@@ -229,7 +229,7 @@ export default { | |||
this.relatedTypes = await apos.http.get('/api/v1/@apostrophecms/import-export/related', { | |||
busy: true, | |||
qs: { | |||
type: this.type | |||
types: [ this.type ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New related route takes an array of types (for future pages implementation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be good to test the route in addition of the method, but lgtm
@@ -229,7 +229,7 @@ export default { | |||
this.relatedTypes = await apos.http.get('/api/v1/@apostrophecms/import-export/related', { | |||
busy: true, | |||
qs: { | |||
type: this.type | |||
types: [ this.type ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be good to test the route in addition of the method, but lgtm
PRO-6416
Summary
findForEditing
to get related documents instead of taking them directly from exported docs. This way data exported isn't limited to projections.related
routes, also checks related types of related types. Ex: if your exported piece is an article with relations to images, before the related modal wouldn't have proposedimage-tag
(relation of images) now it does.What are the specific steps to test this change?
Related modal should should also show the related types of the exported document related documents. Still have a recursion level limit of 10 (that is probably useless).
Let's say you have articles and topics.
Topics has projections.
Export an article with a relation to a topic.
It should export the entire topic not only projected fields
Cypress tests: 🟠
What kind of change does this PR introduce?
Make sure the PR fulfills these requirements: