Homec4science

Separate reading object values out of didSetObject() in CustomField

Authored by epriestley <git@epriestley.com> on Feb 21 2014, 23:44.

Description

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.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3886

Differential Revision: https://secure.phabricator.com/D8299

Details

Committed
epriestley <git@epriestley.com>Feb 21 2014, 23:44
Pushed
aubortJan 31 2017, 17:16
Parents
rPHce5eafe7f19b: Move "Open in Editor" to File Box
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHb62420e6e4e0: Separate reading object values out of didSetObject() in CustomField (authored by epriestley <git@epriestley.com>).Feb 21 2014, 23:44