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
F15532862: D20482.diff
Wed, Apr 23, 5:29 PM
F15514692: D20482.id48858.diff
Fri, Apr 18, 4:36 AM
F15492104: D20482.id48857.diff
Sat, Apr 12, 10:58 AM
F15490857: D20482.id.diff
Fri, Apr 11, 9:08 PM
F15456480: D20482.diff
Mar 30 2025, 10:01 AM
F15439003: D20482.diff
Mar 26 2025, 5:09 AM
F15417132: D20482.id48858.diff
Mar 20 2025, 3:33 PM
F15364521: D20482.diff
Mar 11 2025, 1:40 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.)