Page MenuHomePhabricator

Fix incorrect construction of subtype map when validating "subtype" transactions against non-subtypable objects
ClosedPublic

Authored by epriestley on Aug 27 2019, 2:57 PM.
Tags
None
Referenced Files
F17659739: D20741.diff
Sat, Jul 12, 2:46 PM
Unknown Object (File)
Sat, Jun 28, 10:09 AM
Unknown Object (File)
May 29 2025, 12:05 PM
Unknown Object (File)
May 10 2025, 4:59 AM
Unknown Object (File)
May 7 2025, 6:26 AM
Unknown Object (File)
May 1 2025, 6:37 AM
Unknown Object (File)
Apr 28 2025, 5:15 PM
Unknown Object (File)
Apr 27 2025, 2:27 PM
Subscribers
None

Details

Summary

Fixes T13389. Currently, we try to "newSubtypeMap()" unconditionally, even if the underlying object does not support subtypes.

  • Only try to build a subtype map if subtype transactions are actually being applied.
  • When subtype transactions are applied to a non-subtypable object, fail more explicitly.
Test Plan

Clicked "Make Editable" in a fresh Calendar transaction form, got an editable form instead of a fatal from "newSubtypeMap()". (Calendar events are not currently subtypable.)

Diff Detail

Repository
rP Phabricator
Branch
subtype1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 23312
Build 32030: Run Core Tests
Build 32029: arc lint + arc unit

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Aug 28 2019, 1:57 PM
This revision was automatically updated to reflect the committed changes.