Skip to content

[2.0] fix(ui): store the user name, not the display name, in Updated by workflow rules - #36056

Merged
anuj-kumary merged 2 commits into
2.0from
anuj-kumary/backport-35998-to-2.0
Oct 23, 2026
Merged

anuj-kumary merged 2 commits into
2.0from
anuj-kumary/backport-35998-to-2.0

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Backport of #35998 to 2.0 (customer: LHV, reported on 2.0.5).

Problem

In a Check Entity Attributes node, the Updated by rule's user dropdown searched on displayName.keyword without mapping the option value, so the saved jsonLogic compared updatedBy against the display label ({"==":[{"var":"updatedBy"},"aaron johnson"]}). Entities store updatedBy as the user name, so the rule never matched.

Fix

JSONLogicSearchClassBase — updatedBy field now uses sourceFieldOptionType: { label: 'displayName', value: 'name' }, the same pattern Owners/Reviewers already use. Dropdown still shows the display name; the stored value is the user name.

Backport notes

Clean cherry-pick of 3b193c1 except the test imports: dropped getEntityLifecycleStages (not on 2.0) and added the EntityReferenceFields import (already present on main).

Tests

  • JSONLogicSearchClassBase.test.ts: 23/23 pass on 2.0; the new updatedBy test fails with the fix reverted.
  • ESLint + Prettier clean on both files.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

The Updated by dropdown now stores the user name while showing the display name.

  • The Updated by picker shows a display name and saves the user name.

No actionable issues were found. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "Merge branch '2.0' into anuj-kumary/back..." · Reviewed by Greptile

…kflow rules (#35998)

The Check Entity Attributes rule builder searched users on displayName.keyword
without mapping the option value, so the saved jsonLogic compared updatedBy
against the display label. Entities store updatedBy as the user name, so the
rule never matched. Show displayName, store name, as Owners/Reviewers do.

(cherry picked from commit 3b193c1)
@anuj-kumary
anuj-kumary requested a review from a team as a code owner October 23, 2026 05:38
@anuj-kumary
anuj-kumary requested review from Rohit0301 and removed request for a team October 23, 2026 05:38
@anuj-kumary anuj-kumary added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@anuj-kumary anuj-kumary self-assigned this Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 68%
68.33% (82947/121388) 53.23% (51387/96521) 53.97% (15280/28310)

@gitar-bot

gitar-bot Bot commented Oct 23, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Changing Updated by rule values to usernames could alter which entities satisfy workflow conditions when names differ from display labels.

Stores the user name rather than the display name for the Updated by workflow rule by mapping the dropdown option value to name in JSONLogicSearchClassBase, so saved jsonLogic now matches entity updatedBy values. Dropdown still shows the display name. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants