-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix: LEAP-897: Fix incorrect usage of name attr in visual tags #5745
Conversation
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
Co-authored-by: hlomzik <[email protected]>
/git merge
|
/git merge develop
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5745 +/- ##
========================================
Coverage 75.92% 75.92%
========================================
Files 158 158
Lines 13359 13359
========================================
Hits 10143 10143
Misses 3216 3216
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/git merge develop
|
PR fulfills these requirements
[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made
ex.fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
Change has impacts in these area(s)
(check all that apply)
Describe the reason for change
This PR addresses a bug where annotations fail to save when users incorrectly assign a name attribute to visual tags that are also referenced by a Control tag. This issue was uncovered during scenarios where visual tags had name attributes and Control tags had toName assign to the name from the visual tag but exhibited no immediate error, leading to unsuccessful annotation saving.
What does this fix?
The application should validate the use of the name attribute on visual or experience tags and display an error if misused, to prevent incorrect configurations and ensure data integrity.
Actual Behavior:
No error is displayed when a name attribute is added incorrectly, and annotations are not saved.
Impact:
This bug prevents users from completing annotations correctly, potentially causing data loss or corruption in projects relying on this functionality.
Solution:
Updated the tag validation logic to check for incorrect name attribute usage on visual tags, ensuring that an error is displayed to the user before saving annotations.
Additional Changes:
Included updates to configValidator unit tests to cover these scenarios and other scenarios that was broke.
What level of testing was included in the change?
(check all that apply)