Repository navigation
Fixes #37164: Show held glossary terms when the same user approves the term again in a session - #38589
Conversation
…e term again in a session One user's edits to a glossary term within a session are consolidated into one version, and postUpdate then receives the version before the session as the original. A term deprecated and approved again by the same user looked unchanged, so the labels held while it was deprecated stayed hidden until the next restart's sweep. postUpdate now also counts the status as changed when the request's own change description records it.
Code Review ✅ Approved 🟡 Medium riskTreating request-level status changes as approvals may reveal previously held glossary labels when a term is reapproved within one session. Postupdate now treats a glossary term as status-changed when the request's own incrementalChangeDescription records an entityStatus change, so held tags surface when the same user deprecates and re-approves within a session. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
🤖 Backport to |
|
🤖 Backport to |
|
🤖 Not backported to
|
|
🤖 Not backported to
|
Follow-up to #38239. Fixes #37164.
Problem
Edits one user makes to a glossary term within a session are consolidated into one version, and
postUpdatethen gets the version from before the session asoriginal. If the same user deprecates a term and approves it again within the session,originalis Approved andupdatedis Approved, sopostUpdatesees no status change. The labels held while the term was deprecated stay hidden until the next restart's sweep.Fix
GlossaryTermRepository.postUpdatealso treats the status as changed when the request's ownincrementalChangeDescriptionrecords anentityStatuschange (changesStatus). No extra query.Tests
GlossaryTermApprovedTaggingIT.approvingAgainInTheSameSessionShowsWhatWasHeldMeanwhile: deprecate (same admin), create a table with the term (held), approve again in the same session, expect the term shown.ConditionTimeout(the term never shows).GlossaryTermApprovedTaggingIT33 / 0,GlossaryTermResourceIT351 / 0 (23 skipped by design), unit (GlossaryTermRepository*Test,ApprovedGlossaryTermGuardTest) 33 / 0. MySQL + Elasticsearch, local.The same fix is already in the 2.0 backport #38507. The 2.1 backport comes from the
To releaselabel.