Page MenuHomePhabricator

Separate reading object values out of didSetObject() in CustomField
ClosedPublic

Authored by epriestley on Feb 21 2014, 9:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 29, 8:04 PM
Unknown Object (File)
Fri, Nov 29, 1:55 AM
Unknown Object (File)
Fri, Nov 29, 1:54 AM
Unknown Object (File)
Fri, Nov 29, 1:54 AM
Unknown Object (File)
Fri, Nov 29, 1:54 AM
Unknown Object (File)
Wed, Nov 27, 3:53 AM
Unknown Object (File)
Nov 24 2024, 12:52 PM
Unknown Object (File)
Nov 11 2024, 12:45 AM
Subscribers

Details

Reviewers
btrahan
Maniphest Tasks
Restricted Maniphest Task
Commits
Restricted Diffusion Commit
rPb62420e6e4e0: Separate reading object values out of didSetObject() in CustomField
Summary

Ref T3886. Broadly, fields break down into two types right now: fields which store data on the object (like DifferentialTitleField) and fields which store data in custom field storage.

The former type generally reads data from the object into local storage prior to editing, then writes it back afterward. Currently, this happens in didSetObject().

However, now that we load and set objects from ApplicationTransactionQuery, we'll do this extra read-field-values on view interfaces too. There, it's unnecessary and sometimes throws data-attached exceptions.

Instead, separate these concepts, and do all the read-from-object / read-from-storage in one logical chunk, separate from didSetObject().

Test Plan
  • Edited Differential revision.
  • Edited Maniphest task.
  • Edited Project.
  • Edited user profile.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

src/view/form/control/AphrontFormPolicyControl.php
183–186

(This fixes some warnings if an object has invalid policy settings, like old projects.)