-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(ui): allow removing parentNodes of Glossary Nodes and Glossary Terms #7135
feat(ui): allow removing parentNodes of Glossary Nodes and Glossary Terms #7135
Conversation
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.
This is awesome! thanks so much Amanda :)
I have one quick graphql doc edit and then I think this PR is ready to roll
...re/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/UpdateParentNodeResolver.java
Show resolved
Hide resolved
@@ -77,7 +82,12 @@ private Boolean updateGlossaryTermParentNode( | |||
// If there is no info aspect for the term already, then we should throw since the model also requires a name. | |||
throw new IllegalArgumentException("Info for this Glossary Term does not yet exist!"); | |||
} | |||
glossaryTermInfo.setParentNode(parentNodeUrn); | |||
|
|||
if (parentNodeUrn != null) { |
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.
nice!
@@ -7254,9 +7254,9 @@ Input for updating the parent node of a resource. Currently only GlossaryNodes a | |||
""" | |||
input UpdateParentNodeInput { | |||
""" | |||
The new parent node urn | |||
The new parent node urn. If parentNode is null, this will remove the parent from this entity |
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.
nice!
return CompletableFuture.supplyAsync(() -> { | ||
Urn currentParentUrn = GlossaryUtils.getParentUrn(targetUrn, context, _entityClient); | ||
// need to be able to manage current parent node and new parent node | ||
if (GlossaryUtils.canManageChildrenEntities(context, currentParentUrn, _entityClient) | ||
&& GlossaryUtils.canManageChildrenEntities(context, parentNodeUrn, _entityClient)) { | ||
&& GlossaryUtils.canManageChildrenEntities(context, finalParentNodeUrn, _entityClient)) { |
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.
Is it okay that final Parent Node is null going into this method?
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.
Looks like the case is covered!
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.
LGTM.- Thank you!!!
Will merge once CI is all green :) |
…erms (datahub-project#7135) Co-authored-by: John Joyce <[email protected]>
…erms (datahub-project#7135) Co-authored-by: John Joyce <[email protected]>
UpdateParentNodeInput
to use optionalparentNode
fieldUpdateParentNodeResolver
to accept emptyparentNode
fieldparentNode
and postfix(Optional)
text to the fieldChecklist