Fixes #27471: Implement Archived status for Glossary Terms#27492
Fixes #27471: Implement Archived status for Glossary Terms#27492aniruddhaadak80 wants to merge 1 commit intoopen-metadata:mainfrom
Conversation
…ossary Term lifecycle
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedImplements the Archived status for Glossary Terms, enabling proper lifecycle management for entries. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
There was a problem hiding this comment.
Pull request overview
Introduces the Archived lifecycle status for Glossary Terms in the UI (and updates API docs) so archived terms can be surfaced/filtered consistently alongside existing governance statuses.
Changes:
- Add
EntityStatus.Archived→StatusType.Archivedmapping inGlossaryUtils.tsx. - Stop filtering out
EntityStatus.Deprecatedfrom the UI status filters list. - Update
GlossaryTermResourcequery param descriptions to includeArchivedas an acceptedentityStatusvalue.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.tsx | Exposes Archived in the status-to-badge mapping and expands available status filter values. |
| openmetadata-service/src/main/java/org/openmetadata/service/resources/glossary/GlossaryTermResource.java | Updates OpenAPI parameter descriptions to document Archived as a supported filter value. |
| export const StatusClass = { | ||
| [EntityStatus.Approved]: StatusType.Success, | ||
| [EntityStatus.Draft]: StatusType.Pending, | ||
| [EntityStatus.Rejected]: StatusType.Failure, | ||
| [EntityStatus.Deprecated]: StatusType.Deprecated, | ||
| [EntityStatus.InReview]: StatusType.InReview, | ||
| [EntityStatus.Unprocessed]: StatusType.Unprocessed, | ||
| [EntityStatus.Archived]: StatusType.Archived, | ||
| }; |
There was a problem hiding this comment.
StatusClass duplicates EntityStatusClass from utils/EntityStatusUtils.ts and already diverges for Unprocessed (here mapped to StatusType.Unprocessed, while the shared util maps it to StatusType.Pending). Since the StatusBadge styles don’t define a .unprocessed variant, this mapping can produce inconsistent/unstyled badges if used. Consider removing this local mapping and reusing the shared EntityStatusClass (or at least aligning Unprocessed to Pending and typing this as Record<EntityStatus, StatusType> to prevent future drift).
| export const StatusFilters = Object.values(EntityStatus).map((status) => ({ | ||
| text: status, | ||
| value: status, | ||
| })); | ||
|
|
There was a problem hiding this comment.
StatusFilters is exported but does not appear to be referenced anywhere in the UI codebase (search only finds its declaration). If it’s no longer used, consider removing it to avoid maintaining dead/duplicate code; if it is expected to be used, add a reference (or update the consumer) so this change actually affects the UI.
| export const StatusFilters = Object.values(EntityStatus).map((status) => ({ | |
| text: status, | |
| value: status, | |
| })); |
Describe your changes:
Fixes #27471
This Pull Request introduces the Archived status into the Glossary Term lifecycle to fully represent an archived state for permanently retired terms that are retained for historical and audit purposes.
Since the EntityStatus JSON schema already formally included Archived alongside Deprecated, this change exposes those valid statuses within the OpenMetadata UI components.
Changes:
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>