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
F19320793: D20482.id48857.diff
Thu, Dec 25, 9:13 AM
F19064378: D20482.id.diff
Nov 29 2025, 8:46 PM
F19052220: D20482.diff
Nov 28 2025, 4:05 AM
F18826467: D20482.diff
Oct 24 2025, 4:06 AM
F18792936: D20482.id48857.diff
Oct 16 2025, 8:29 PM
F18787740: D20482.id.diff
Oct 15 2025, 1:15 AM
F18768903: D20482.diff
Oct 8 2025, 5:49 AM
F18750001: D20482.id48858.diff
Oct 4 2025, 6:05 AM
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.)