mikebridge opened a new pull request, #43835:
URL: https://github.com/apache/superset/pull/43835

   ### SUMMARY
   
   The version-history panel's **"Search actions"** box runs a server-side 
substring filter (`_record_matches` in 
`superset/versioning/activity/orchestrator.py`). Its search haystack covered 
`summary`, `entity_name`, `kind`, the joined `path` segments, and the JSON form 
of `from_value`/`to_value` — but **never the change author**. So typing an 
author's name returned "No actions found" even when every entry in the timeline 
was authored by that user, and the result count undercounted. Filtering history 
by *who* made a change is a primary expected use of the box, and it was 
silently broken.
   
   The fix adds the change author's display name to the haystack, sourced from 
the already-projected `changed_by` DTO (`{id, first_name, last_name}`). Two 
properties are preserved deliberately:
   
   - **Security/redaction**: record decoration sets `changed_by = None` for a 
tombstoned *related* entity whose editor identity must not be disclosed. 
Reading the author from `changed_by` means a redacted record contributes no 
author text and stays unsearchable by author — the redaction contract is kept 
intact.
   - **Partial names**: a user with only a first or last name still matches on 
the present part.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Backend-only change. Before: `GET 
/api/v1/chart/<uuid>/activity/?include=all&q=<author name>` → `count 0` on a 
timeline entirely authored by that user. After: the same query matches that 
author's entries.
   
   ### TESTING INSTRUCTIONS
   
   `pytest tests/unit_tests/versioning/test_activity.py -k record_matches` — 
adds coverage for author substring / full-name / case-insensitive matching, 
single-part names, and the redacted (`changed_by is None`) case.
   
   Manual: open a chart/dashboard version-history panel whose saves are by one 
author, type that author's name in "Search actions" — the timeline filters to 
their entries instead of showing "No actions found".
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to