From 1cb924ce68ba2f67b8b1871123a6fe71b3aa4f11 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 14 Feb 2017 02:52:29 +0000 Subject: [PATCH] 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 --- .../controller/PhabricatorDashboardPanelEditController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/dashboard/controller/PhabricatorDashboardPanelEditController.php b/src/applications/dashboard/controller/PhabricatorDashboardPanelEditController.php index 7d2f2de5e3..cc7502afef 100644 --- a/src/applications/dashboard/controller/PhabricatorDashboardPanelEditController.php +++ b/src/applications/dashboard/controller/PhabricatorDashboardPanelEditController.php @@ -143,7 +143,7 @@ final class PhabricatorDashboardPanelEditController ->applyTransactions($panel, $xactions); // If we're creating a panel directly on a dashboard, add it now. - if ($dashboard) { + if ($dashboard && $is_create) { PhabricatorDashboardTransactionEditor::addPanelToDashboard( $viewer, PhabricatorContentSource::newFromRequest($request),