1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 10:22:42 +01:00
phorge-phorge/src/applications/transactions/storage
epriestley af1fef242c Fix an issue with editing pre-space objects using a form with no visibility controls
Summary:
WMF ran into this after their update. Here's the setup:

  - When you enable Spaces, we leave all existing objects set to `null`, which means "these belong to the default space". This is so we don't have to go update a trillion objects.
  - New objects get set to the default space explicitly (`PHID-SPCE-...`) but older ones stay with `null`.
  - If you edit an older object (like a task) from the time before Spaces, //and// the form doesn't have a Visbility/Spaces control, we would incorrectly poplate the value with `null` when the effective value should be the default space PHID.
  - This caused a "You must choose a space." error in the UI.

Instead, populate the control with the effective value instead of the literal database value. This makes the edit go through cleanly.

Also add a note about this for future-me.

Test Plan:
  - Disabled "Visibility" control in task edit form.
  - Edited an old task which had `null` as a `spacePHID` in the database.
  - Before patch: UI error about selecting a Space.
  - After patch: edit goes through cleanly.

Reviewers: chad, 20after4

Reviewed By: chad, 20after4

Subscribers: 20after4, aklapper

Differential Revision: https://secure.phabricator.com/D15306
2016-02-18 11:15:40 -08:00
..
PhabricatorApplicationTransaction.php Fix an issue with editing pre-space objects using a form with no visibility controls 2016-02-18 11:15:40 -08:00
PhabricatorApplicationTransactionComment.php Policy - add an explanation for automatic capabilities for transactions and transaction comments 2015-02-02 14:41:50 -08:00
PhabricatorEditEngineConfiguration.php Don't autoname milestones, but do show the previous milestone name as a hint 2016-02-12 11:04:46 -08:00
PhabricatorEditEngineConfigurationTransaction.php Restore "Create" transactions 2015-12-18 11:56:03 -08:00