Page MenuHomePhabricator

In ApplicationTransactionEditor, determine new objects with "getID()" instead of "getPHID()"
ClosedPublicDraft

Authored by epriestley on Apr 29 2019, 2:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 25, 3:45 AM
Unknown Object (File)
Oct 1 2024, 4:03 PM
Unknown Object (File)
Sep 15 2024, 8:14 PM
Unknown Object (File)
Sep 15 2024, 6:20 PM
Unknown Object (File)
Sep 15 2024, 1:40 AM
Unknown Object (File)
Sep 14 2024, 6:00 PM
Unknown Object (File)
Sep 14 2024, 3:38 PM
Unknown Object (File)
Sep 14 2024, 3:37 PM
Subscribers
None

Details

Reviewers
amckinley
Summary

See https://discourse.phabricator-community.org/t/unable-to-reload-object-that-hasnt-been-loaded/2677.

When editing "Config" objects, they currently get a PHID set outside of the TransactionEditor. They probably should not, but fixing that is likely an involved change.

This causes us to incorrectly fail to detect $is_new correctly and try to reload() and object with no ID.

To work around this, test for new objects with getID() instead of getPHID().

Test Plan

Edited any config value with the web UI.

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 Draft.Apr 29 2019, 2:37 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.

(This is a consequence of D20462, which was actually performing a separate getID() test, I just merged the getID() test into the $is_new test in that change.)