
Maria A NunezandMattermost Build
724c5b7191
CPA Display Name Support (#36247)
* Phase 1: CPA display_name + CEL-safe name validation (server)
- Add typed DisplayName field to CPAAttrs + display_name attr key constant.
- Add ValidateCPAFieldName helper enforcing CEL IDENTIFIER + reserved-word blacklist.
- Wire validation into App.CreateCPAField (always) and App.PatchCPAField (lenient grandfather: skip when Name unchanged).
- Trim + 255-rune cap DisplayName in CPAField.SanitizeAndValidate.
- Developer-facing godoc note documenting rule, sources of truth, and Option C scoping.
- Asserting test for documented Option C plugin-API bypass (closed by PR #36173).
Spec: planner/projects/property-display-name/ideas/001-cpa-display-name/spec.md
Plan: .planning/phase-1/PLAN.md
Made-with: Cursor
* Phase 1 (review): address Reza's Major + Minor findings
- Rename misleading subtest "empty DisplayName is omitted from attrs"
to "empty DisplayName round-trips as empty string" (Major #1).
- Add TestCPAAttrs_JSONOmitEmpty pinning the omitempty wire-format
contract that PR #36173's typed-attrs strategy relies on (Major #1).
- Extend TestValidateCPAFieldName: case-sensitivity (IN/In ok),
single-character names (a/_/A ok), missing "as" reserved word
(Minor #2). Add whitespace-only DisplayName case (Minor #2).
- Document PropertyFieldNameMaxRunes reuse in SanitizeAndValidate
to prevent drift (Minor #3).
- Replace broken PLAN-server.md reference in bypass-test docstring
with in-tree CPAAttrs godoc reference (Minor #4).
- Document omitempty semantics on CPAAttrs.DisplayName field to
prevent the same misreading caught in review (Minor #5).
- Document grouping intent above CPAFieldNameReservedWords (Minor #8).
Review: .planning/phase-1/REVIEW.md
Made-with: Cursor
* Phase 2: in-app backfill migration for CPA display_name
- Add cpaDisplayNameBackfillKey + cpaDisplayNameBackfillVersion constants.
- Implement (*Server).doSetupCPADisplayNameBackfill: idempotent, cursor-paged
scan over CPA group fields; backfill attrs.display_name = name when empty.
- Register in m1 migration slice in doAppMigrations (mlog.Fatal on error,
matching existing convention).
- Three migration tests: NoExistingFields, BackfillsMissing, Idempotent.
System-key idempotency + per-field DisplayName-empty check together provide
HA-safe behavior on rolling deploys (last-write-wins on the System key;
data-level idempotency from the per-field check).
Spec: planner/projects/property-display-name/ideas/001-cpa-display-name/spec.md
Plan: .planning/phase-2/PLAN.md
Made-with: Cursor
* Phase 2 (review): document race + harden idempotency test
- Document SearchPropertyFields→UpdatePropertyFields rolling-deploy
race: stale snapshot can revert concurrent admin CPA rename. Pre-
existing systemic shape (no UpdateAt optimistic-lock); narrow
window; bounded blast radius (admin re-rename, ABAC ID-keyed).
Accepted limitation per spec Out of Scope (Major #1, Option C).
- Tighten TestCPADisplayNameBackfill_Idempotent: snapshot UpdateAt
before second run; assert no DB write on the System key or the
field row (Major #2).
- Extract clearCPABackfillMarker helper with explanatory godoc to
centralize the 3x-repeated test precondition (Minor #1).
- Comment fieldA seed as the "key-present-as-empty-string" idempotency
boundary case (Minor #6).
- Add godoc to doSetupCPADisplayNameBackfill (Minor #10).
Review: .planning/phase-2/REVIEW.md
Made-with: Cursor
* Linting
* Removing unnecessary comments
* Clean up tests
* Linting
* Fix tests
* Updated API doc
* Fix tests
* PR Feedback
* Move migration to PropertyService
* Linting
* Linting
* Removed pagination
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-05-04 10:33:05 -04:00
..
2026-04-17 11:15:09 -04:00
2026-01-15 13:39:46 -05:00
2026-03-05 15:20:17 +01:00
2026-02-10 10:10:27 -05:00
2024-10-01 14:06:45 -04:00
2026-04-08 16:49:43 -03:00
2026-04-30 10:46:44 +02:00
2025-07-18 12:54:51 +02:00
2026-05-04 10:33:05 -04:00
2026-04-30 12:18:26 +02:00
2026-04-08 16:49:43 -03:00
2025-08-05 09:09:07 -04:00
2026-04-08 16:49:43 -03:00
2026-04-30 00:56:32 +02:00
2026-04-30 00:56:32 +02:00
2025-11-12 13:00:51 +01:00
2025-07-18 12:54:51 +02:00
2026-03-30 16:20:47 +00:00
2026-03-30 16:20:47 +00:00
2026-03-30 16:20:47 +00:00
2026-03-30 16:20:47 +00:00
2026-03-10 10:31:10 -04:00
2026-04-16 00:48:43 +02:00
2026-03-26 07:54:50 +00:00
2025-11-12 14:07:12 +01:00
2026-04-08 16:49:43 -03:00
2025-09-11 16:43:34 +02:00
2026-03-27 10:36:35 +01:00
2026-04-16 04:02:12 +03:00
2026-01-20 10:38:27 +01:00
2026-01-20 10:38:27 +01:00
2026-04-28 15:16:57 +00:00
2026-04-28 15:16:57 +00:00
2025-05-21 16:35:00 +02:00
2025-05-30 13:58:26 +02:00
2025-11-12 13:00:51 +01:00
2025-09-10 15:11:32 +02:00
2026-04-14 09:00:59 -04:00
2026-04-14 09:00:59 -04:00
2026-04-22 22:25:56 -04:00
2026-04-30 00:56:32 +02:00
2026-04-16 04:02:12 +03:00
2025-07-15 12:58:18 -04:00
2025-11-12 13:00:51 +01:00
2026-03-25 12:06:34 -04:00
2025-05-30 13:58:26 +02:00
2026-04-30 12:18:26 +02:00
2026-01-21 11:31:05 +01:00
2025-11-12 13:00:51 +01:00
2025-06-06 15:07:54 +02:00
2026-05-04 06:40:26 +05:30
2026-05-04 06:40:26 +05:30
2026-03-26 07:54:50 +00:00
2026-05-04 10:33:05 -04:00
2026-05-04 10:33:05 -04:00
2025-11-12 13:00:51 +01:00
2024-11-04 13:27:07 +01:00
2025-07-22 11:53:42 +02:00
2025-11-12 13:00:51 +01:00
2025-11-12 13:00:51 +01:00
2025-09-30 11:41:14 -04:00
2026-03-30 16:20:47 +00:00
2025-11-12 13:00:51 +01:00
2025-11-12 13:00:51 +01:00
2025-11-12 13:00:51 +01:00
2025-09-10 15:11:32 +02:00
2025-11-12 13:00:51 +01:00
2026-01-26 17:05:34 -05:00
2025-11-12 13:00:51 +01:00
2025-08-20 10:17:45 +02:00
2024-12-18 17:36:17 +01:00
2026-04-10 10:49:04 -04:00
2025-09-10 15:11:32 +02:00
2026-01-13 11:40:03 -04:00
2025-11-12 13:00:51 +01:00
2025-11-12 13:00:51 +01:00
2024-04-22 12:03:28 +02:00
2025-05-30 13:58:26 +02:00
2024-11-14 08:42:32 +01:00
2026-05-04 06:40:26 +05:30
2026-05-04 06:40:26 +05:30
2026-02-05 12:45:57 +01:00
2026-02-09 10:13:48 +00:00
2026-04-10 09:40:08 -07:00
2026-03-30 22:40:40 -04:00
2026-04-22 16:19:03 +02:00
2026-04-22 16:19:03 +02:00
2026-03-05 15:20:17 +01:00
2025-07-18 12:54:51 +02:00
2025-03-17 14:22:07 +01:00
2026-03-18 12:16:55 +00:00
2026-04-10 17:32:14 +05:30
2026-04-10 17:32:14 +05:30
2025-09-18 16:14:24 +02:00
2026-04-30 11:43:08 +02:00
2026-04-30 11:43:08 +02:00
2025-09-10 15:11:32 +02:00
2025-11-12 13:00:51 +01:00
2025-09-04 18:46:18 +00:00
2026-03-10 10:31:10 -04:00
2026-03-10 10:31:10 -04:00
2026-04-08 20:48:36 -04:00
2026-04-08 20:48:36 -04:00
2025-07-22 20:40:55 +05:30
2025-05-30 13:58:26 +02:00
2024-12-12 20:15:38 +01:00
2026-03-10 16:37:21 +01:00
2025-05-30 13:58:26 +02:00
2025-11-12 13:00:51 +01:00
2026-02-13 18:07:54 +05:30
2026-05-04 10:33:05 -04:00
2026-05-04 10:33:05 -04:00
2026-04-17 11:15:09 -04:00
2025-09-10 15:11:32 +02:00
2026-04-08 16:49:43 -03:00
2026-02-19 13:44:36 +02:00
2026-03-10 16:37:21 +01:00
2026-01-20 10:38:27 +01:00
2026-04-08 20:48:36 -04:00
2026-04-08 20:48:36 -04:00
2026-03-18 13:31:48 -04:00
2026-03-18 13:31:48 -04:00
2025-11-12 13:00:51 +01:00
2025-09-10 15:11:32 +02:00
2026-02-09 16:26:14 +02:00
2026-02-09 16:26:14 +02:00
2026-03-30 16:20:47 +00:00
2026-04-15 14:57:46 +00:00
2026-04-16 00:48:43 +02:00
2025-11-12 13:00:51 +01:00
2025-09-18 16:14:24 +02:00
2026-04-24 11:51:02 +02:00
2026-04-28 08:53:06 -04:00
2025-11-12 13:00:51 +01:00
2026-01-21 11:31:05 +01:00
2025-11-12 13:00:51 +01:00
2024-04-16 18:53:26 +05:30
2025-11-12 13:00:51 +01:00
2026-02-16 17:10:39 +01:00
2025-11-12 13:00:51 +01:00
2026-04-22 22:25:56 -04:00
2026-01-13 11:40:03 -04:00
2026-04-03 13:43:25 +00:00
2024-04-24 11:52:33 +02:00
2025-11-12 13:00:51 +01:00
2026-03-26 07:54:50 +00:00
2024-11-05 09:59:24 +01:00
2026-04-08 20:48:36 -04:00
2026-01-21 11:31:05 +01:00
2025-11-12 13:00:51 +01:00
2025-11-12 13:00:51 +01:00
2025-06-24 15:11:02 -03:00
2026-01-20 10:38:27 +01:00
2026-03-25 13:41:33 +00:00
2026-01-20 10:38:27 +01:00
2025-10-02 20:24:29 +05:30
2025-11-12 13:00:51 +01:00
2025-01-13 18:16:56 +05:30
2026-02-12 05:25:49 -05:00
2026-02-12 05:25:49 -05:00
2026-04-16 04:02:12 +03:00
2026-04-16 04:02:12 +03:00
2026-03-27 08:51:29 -07:00
2026-04-01 11:30:35 +02:00
2026-04-06 08:47:24 +05:30
2026-04-06 08:47:24 +05:30
2026-02-17 20:10:30 -05:00
2026-01-20 10:38:27 +01:00
2026-01-20 10:38:27 +01:00
2026-02-03 11:32:03 -05:00
2026-05-04 06:40:26 +05:30
2026-05-04 06:40:26 +05:30
2025-09-10 15:11:32 +02:00
2025-11-12 13:00:51 +01:00
2025-09-10 15:11:32 +02:00
2026-04-24 11:51:02 +02:00
2026-04-24 11:51:02 +02:00
2026-04-24 11:51:02 +02:00
2026-04-29 18:47:34 +00:00
2026-04-29 18:47:34 +00:00
2026-03-19 11:36:19 +01:00
2026-03-19 11:36:19 +01:00
2026-01-20 10:38:27 +01:00
2025-12-11 07:59:50 +01:00
2026-04-08 20:48:36 -04:00
2026-03-30 16:20:47 +00:00
2026-05-04 08:53:59 -04:00
2026-04-28 13:37:33 -04:00
2026-03-12 12:50:53 -04:00
2026-03-12 12:50:53 -04:00
2025-11-05 14:21:13 +00:00
2026-03-16 14:36:55 -04:00
2026-03-16 14:36:55 -04:00
2025-10-22 18:03:33 -03:00
2025-11-12 13:00:51 +01:00
2026-03-27 08:51:29 -07:00
2026-01-07 10:40:05 -04:00
2026-01-07 10:40:05 -04:00
2025-09-10 15:11:32 +02:00
2025-09-04 18:46:18 +00:00
2026-04-08 20:48:36 -04:00
2026-05-04 08:53:59 -04:00
2026-04-28 08:53:06 -04:00
2025-09-10 15:11:32 +02:00
2026-04-10 09:40:08 -07:00
2026-04-20 16:48:32 -04:00
2026-04-14 14:31:25 -04:00
2026-04-07 18:49:54 +02:00
2026-04-28 08:53:06 -04:00
2026-04-14 14:31:25 -04:00
2026-04-07 13:25:38 +03:00
2026-04-07 13:25:38 +03:00
2026-04-03 13:43:25 +00:00
2025-09-10 15:11:32 +02:00
2026-03-30 16:20:47 +00:00
2026-03-30 16:20:47 +00:00
2026-04-10 10:49:04 -04:00
2026-03-30 11:13:09 -04:00
2025-11-12 13:00:51 +01:00
2025-05-20 11:15:25 +02:00
2026-04-30 00:56:32 +02:00
2026-04-30 00:56:32 +02:00
2026-04-08 16:49:43 -03:00
2026-03-25 08:45:17 -04:00
2026-02-16 17:10:39 +01:00
2026-02-16 17:10:39 +01:00
2025-11-12 13:00:51 +01:00
2026-04-23 14:09:26 -04:00
2025-11-12 13:00:51 +01:00
2026-03-04 15:16:11 +00:00
2026-03-30 13:41:32 -03:00
2026-04-08 16:49:43 -03:00
2025-11-12 13:00:51 +01:00
2026-04-28 20:50:29 +00:00
2025-11-12 13:00:51 +01:00
2026-04-28 20:50:29 +00:00
2026-03-27 10:36:35 +01:00
2026-03-27 10:36:35 +01:00
2026-04-16 17:38:40 +02:00
2026-04-16 17:38:40 +02:00
2025-11-12 13:00:51 +01:00
2025-12-11 07:59:50 +01:00
2026-03-10 16:37:21 +01:00
2026-04-07 13:25:38 +03:00
2025-11-12 13:00:51 +01:00