@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix an issue where editing a dashboard panel from a dashboard could duplicate the panel

Summary:
Depends on D20472. Ref T13272. Currently, when you edit a panel from a dashboard, we try to add the panel to the dashboard. This always works since dashboards no longer enforce panel uniqueness, and you can end up with duplicate panels.

Instead, only add panels if we're creating them.

Test Plan:
- Edited an existing panel, no duplication.
- Created a new panel, saw it added to the dashboard.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13272

Differential Revision: https://secure.phabricator.com/D20473

+6
+6
src/applications/dashboard/editor/PhabricatorDashboardPanelEditEngine.php
··· 134 134 $context = $this->getContextObject(); 135 135 136 136 if ($context instanceof PhabricatorDashboard) { 137 + // Only add the panel to the dashboard when we're creating a new panel, 138 + // not if we're editing an existing panel. 139 + if (!$this->getIsCreate()) { 140 + return; 141 + } 142 + 137 143 $viewer = $this->getViewer(); 138 144 $controller = $this->getController(); 139 145 $request = $controller->getRequest();