Skip to content

Fixes #27471: Implement Archived status for Glossary Terms#27492

Open
aniruddhaadak80 wants to merge 1 commit intoopen-metadata:mainfrom
aniruddhaadak80:fix-glossary-term-archived-status-27471
Open

Fixes #27471: Implement Archived status for Glossary Terms#27492
aniruddhaadak80 wants to merge 1 commit intoopen-metadata:mainfrom
aniruddhaadak80:fix-glossary-term-archived-status-27471

Conversation

@aniruddhaadak80
Copy link
Copy Markdown

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:

  1. Updated GlossaryUtils.tsx to stop masking EntityStatus.Deprecated, explicitly adding EntityStatus.Archived and restoring EntityStatus.Deprecated to StatusFilters.
  2. Expanded the GlossaryTermResource.java query param descriptions to accurately reflect the availability of Archived as a parameter.

Type of change:

  • Enhancement

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • I have added a test that covers the exact scenario we are fixing.

@aniruddhaadak80 aniruddhaadak80 requested a review from a team as a code owner April 17, 2026 16:59
Copilot AI review requested due to automatic review settings April 17, 2026 16:59
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 17, 2026

Code Review ✅ Approved

Implements the Archived status for Glossary Terms, enabling proper lifecycle management for entries. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ArchivedStatusType.Archived mapping in GlossaryUtils.tsx.
  • Stop filtering out EntityStatus.Deprecated from the UI status filters list.
  • Update GlossaryTermResource query param descriptions to include Archived as an accepted entityStatus value.

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.

Comment on lines 136 to 144
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,
};
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment on lines +146 to 150
export const StatusFilters = Object.values(EntityStatus).map((status) => ({
text: status,
value: status,
}));

Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
export const StatusFilters = Object.values(EntityStatus).map((status) => ({
text: status,
value: status,
}));

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Glossary Term Lifecycle

2 participants