feat(glossary): change a term's lifecycle stage and create a new version from the UI
Merged
MA
1mo ago+1032+1032+0123456789012345678901234567890123456789-37-37-01234567890123456789
Summary
Glossary term pages get two actions in the entity menu, and glossary views show each term's version and lifecycle stage.
- Change stage: for users with Edit Lifecycle Stage (or Edit Entity). The modal offers only the stages the term can move to under each stage's
allowedPreviousStages, and shows server rejections inline. - New version: with entity versioning on, for users who can manage the term, on the latest (or a not yet versioned) term. Creates the new version as a draft and opens it. On a versioned term, Delete reads Delete version.
- Badges: the version and stage show in the glossary sidebar, glossary list cards and the hierarchy module. Search cards show the stage when one is set.
- Hidden-stage terms: users who can manage a glossary node also see its terms in hidden stages (such as drafts) in the sidebar.
- Change history: glossary terms gain a Lifecycle stage filter.
- Fix:
validateCustomUrnIdaccepted ids starting with a space, comma, parenthesis or colon.
Stack
- #20630 Authorize and validate
setLifecycleStage - #20631 Glossary term versioning and default glossary stages
- #20632 UI: change stage, new version, badges š this PR
- #20633 Business Glossary guide
Origin
Ported from DataHub Cloud: acryldata/datahub-fork#9192 (badges), acryldata/datahub-fork#13480 (Change stage), acryldata/datahub-fork#13510 (New version). Left out: proposing a stage change (Cloud-only proposals), the Cloud feature flag around the menu (the action already shows only when the user can edit and a stage is reachable), and the glossary relationship changes from #9192. Strings are in OSS namespaces, English only.
Testing
- Vitest:
LifecycleStageModal,CreateGlossaryTermVersionModal,EntityDropdown/utils,useGlossaryChildren,HistorySidebar.utils,validateCustomUrnId, and the existing glossary, hierarchy module and preview suites. yarn type-check,yarn format-checkand eslint pass locally.lint-jobsonly runs on PRs intomaster, so it runs here once the earlier PRs merge.- A manual run in the browser is still to do.
Checklist
- The PR conforms to DataHub's Contributing Guideline (particularly PR Title Format)
- Tests for the changes have been added/updated
š¤ Generated with Claude Code