1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 14:30:56 +01:00

Fix duplicating panel when editing in column 2

Summary: Fixes T10612. We're writing a new panel to any dashboard even if it already exists. No need when just updating a panel title.

Test Plan: Add "welcome" panel to column 2 of a clean dashboard. Edit title, save. See correct panel in correct place.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10612

Differential Revision: https://secure.phabricator.com/D17349
This commit is contained in:
Chad Little 2017-02-14 02:52:29 +00:00 committed by chad
parent f9163bf065
commit 1cb924ce68

View file

@ -143,7 +143,7 @@ final class PhabricatorDashboardPanelEditController
->applyTransactions($panel, $xactions); ->applyTransactions($panel, $xactions);
// If we're creating a panel directly on a dashboard, add it now. // If we're creating a panel directly on a dashboard, add it now.
if ($dashboard) { if ($dashboard && $is_create) {
PhabricatorDashboardTransactionEditor::addPanelToDashboard( PhabricatorDashboardTransactionEditor::addPanelToDashboard(
$viewer, $viewer,
PhabricatorContentSource::newFromRequest($request), PhabricatorContentSource::newFromRequest($request),