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
F19859913: D20482.id.diff
Sat, Mar 14, 6:11 AM
F19851218: D20482.diff
Thu, Mar 12, 11:26 PM
F19824601: D20482.id.diff
Sun, Mar 8, 1:04 AM
F19804374: D20482.id48857.diff
Mon, Mar 2, 7:15 AM
F19804047: D20482.id48858.diff
Mon, Mar 2, 4:38 AM
F19749184: D20482.diff
Feb 15 2026, 8:01 PM
F19652202: D20482.id48858.diff
Feb 6 2026, 1:15 PM
F19617578: D20482.id48857.diff
Feb 4 2026, 6:37 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.)