Repository navigation
[2.0] Fixes #35913: remove tags a resolved TagUpdate leaves out - #37724
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🔴 High riskChanging approved TagUpdate resolution rewrites stored entity tags and could remove valid classifications or leave stale labels, affecting metadata integrity. Approved TagUpdate resolution now replaces the target's tags with the approved list, so a Replace within a mutually exclusive classification and a Remove both take effect instead of being silently dropped. Tags added after the task was filed are preserved. 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 |
Describe your changes:
Fixes #35913
Backport of #36008 to
2.0.2.0has diverged frommain, so this is a hand port, not a cherry-pick. The behaviour is the same.When a TagUpdate task is approved, the UI sends
newValue= the task'scurrentTagsminustagsToRemoveplustagsToAdd. The server droppedtagsToRemoveand only added. As a result:Now the approved list replaces what the task saw (its
currentTagssnapshot plustagsToRemove). Tags added to the target after the task was filed stay, unless an approved tag from the same mutually exclusive classification displaces them. A task without a snapshot only removes itstagsToRemove.What differs from
main:2.0has noEntityFieldPath. The target's tags are read throughTaskTagTarget.isEntityLevelandFieldPathUtils.findField(entity, TaskTagTarget.locatablePath(fieldPath)), the same lookup2.0'spatchFieldTagsalready uses. The tests carry only #36008's additions, not themain-only tests around them.Type of change:
Tests:
TaskResourceIT#testApproveColumnTag*: 4 ITs that resolve TagUpdate tasks the way the UI does. They cover a Replace within a mutually exclusive classification, a Remove with a tag added after the task, a concurrent swap, and an Add without a snapshot.TaskWorkflowHandlerTest: the 5 unit tests from Fixes #35913: remove tags a resolved TagUpdate leaves out #36008.TaskWorkflowHandlerTest19/19 (5 new);TaskResourceIT#testApproveColumnTag*4/4 on mysql-elasticsearch and 4/4 on postgres-opensearch; spotless clean.Checklist:
Fixes <issue-number>: <short explanation>🤖 Generated with Claude Code