diff --git a/src/applications/dashboard/storage/PhabricatorDashboard.php b/src/applications/dashboard/storage/PhabricatorDashboard.php index b79fded93f..2e673de19c 100644 --- a/src/applications/dashboard/storage/PhabricatorDashboard.php +++ b/src/applications/dashboard/storage/PhabricatorDashboard.php @@ -74,7 +74,15 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO public function setLayoutConfigFromObject( PhabricatorDashboardLayoutConfig $object) { + $this->setLayoutConfig($object->toDictionary()); + + // See PHI385. Dashboard panel mutations rely on changes to the Dashboard + // object persisting when transactions are applied, but this assumption is + // no longer valid after T13054. For now, just save the dashboard + // explicitly. + $this->save(); + return $this; } diff --git a/src/applications/dashboard/typeahead/PhabricatorDashboardPanelDatasource.php b/src/applications/dashboard/typeahead/PhabricatorDashboardPanelDatasource.php index d534d32adc..8bbdb1a5e5 100644 --- a/src/applications/dashboard/typeahead/PhabricatorDashboardPanelDatasource.php +++ b/src/applications/dashboard/typeahead/PhabricatorDashboardPanelDatasource.php @@ -34,8 +34,10 @@ final class PhabricatorDashboardPanelDatasource $impl = $panel->getImplementation(); if ($impl) { $type_text = $impl->getPanelTypeName(); + $icon = $impl->getIcon(); } else { $type_text = nonempty($panel->getPanelType(), pht('Unknown Type')); + $icon = 'fa-question'; } $id = $panel->getID(); $monogram = $panel->getMonogram(); @@ -44,7 +46,7 @@ final class PhabricatorDashboardPanelDatasource $result = id(new PhabricatorTypeaheadResult()) ->setName($monogram.' '.$panel->getName()) ->setPHID($id) - ->setIcon($impl->getIcon()) + ->setIcon($icon) ->addAttribute($type_text); if (!empty($properties['class'])) {