-
Notifications
You must be signed in to change notification settings - Fork 21
ITEP-66910 - Fix adding a label on a subgroup #229
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
base: main
Are you sure you want to change the base?
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.
Pull Request Overview
This PR fixes the payload for adding a label under a subgroup by using the elementβs id
instead of its name
.
- Updated the label payload to reference
parentElement.id
for subgroup relationships. - Adjusted the unit test to assert the new
parentLabelId
value.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
web_ui/src/core/projects/hooks/utils.ts | Switched parentLabelId from parentElement.name to parentElement.id . |
web_ui/src/core/projects/hooks/utils.test.ts | Updated the expected parentLabelId in the test to match the new UUID. |
Could you add a unit test for this? |
it exists already. i updated it. it failed when i made the change |
return getNewLabelPayloadNew({ ...label, parentLabelId: parentElement.name }, shouldRevisit); | ||
return getNewLabelPayloadNew({ ...label, parentLabelId: parentElement.id }, shouldRevisit); |
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.
Does this also work when creating a new group hiearchy? I.e. when the parentElement
is also a new label (so therefore not having an id)
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.
I also thought about that case - the problem is that during creation we do not have id, only the name
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.
It does : )
π Description
β¨ Type of Change
Select the type of change your PR introduces:
π§ͺ Testing Scenarios
Describe how the changes were tested and how reviewers can test them too:
β Checklist
Before submitting the PR, ensure the following: