@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.

Add more transation data to panel tab changes

Summary: Fixes T10473. Clever, didn't know we could do this, but works well. Renders out the tab names by ', '.

Test Plan:
Add a tab panel, change some names, review transactions.

{F2929594}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10473

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

+43
+43
src/applications/dashboard/customfield/PhabricatorDashboardPanelTabsCustomField.php
··· 33 33 $this->setFieldValue($value); 34 34 } 35 35 36 + public function getApplicationTransactionTitle( 37 + PhabricatorApplicationTransaction $xaction) { 38 + $author_phid = $xaction->getAuthorPHID(); 39 + $old = $xaction->getOldValue(); 40 + $new = $xaction->getNewValue(); 41 + 42 + $new_tabs = array(); 43 + if ($new) { 44 + foreach ($new as $new_tab) { 45 + $new_tabs[] = $new_tab['name']; 46 + } 47 + $new_tabs = implode(' | ', $new_tabs); 48 + } 49 + 50 + $old_tabs = array(); 51 + if ($old) { 52 + foreach ($old as $old_tab) { 53 + $old_tabs[] = $old_tab['name']; 54 + } 55 + $old_tabs = implode(' | ', $old_tabs); 56 + } 57 + 58 + if (!$old) { 59 + // In case someone makes a tab panel with no tabs. 60 + if ($new) { 61 + return pht( 62 + '%s set the tabs to "%s".', 63 + $xaction->renderHandleLink($author_phid), 64 + $new_tabs); 65 + } 66 + } else if (!$new) { 67 + return pht( 68 + '%s removed tabs.', 69 + $xaction->renderHandleLink($author_phid)); 70 + } else { 71 + return pht( 72 + '%s changed the tabs from "%s" to "%s".', 73 + $xaction->renderHandleLink($author_phid), 74 + $old_tabs, 75 + $new_tabs); 76 + } 77 + } 78 + 36 79 public function renderEditControl(array $handles) { 37 80 // NOTE: This includes archived panels so we don't mutate the tabs 38 81 // when saving a tab panel that includes archied panels. This whole UI is