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
Unknown Object (File)
Wed, Mar 27, 4:20 AM
Unknown Object (File)
Tue, Mar 5, 9:21 PM
Unknown Object (File)
Feb 20 2024, 7:15 PM
Unknown Object (File)
Jan 15 2024, 1:01 PM
Unknown Object (File)
Dec 22 2023, 8:01 AM
Unknown Object (File)
Dec 19 2023, 7:38 PM
Unknown Object (File)
Nov 30 2023, 6:24 AM
Unknown Object (File)
Nov 25 2023, 10:31 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.