Skip to content

Commit 386a5ee

Browse files
author
epriestley
committed
Show description changes in Maniphest
Summary: When a task description is updated, there's currently no way to see the change. Build an "expanded summary" mode for transactions that shows description change details. Also include changes in the email. Test Plan: Changed task descriptions, clicked "show details", read email. Reviewed By: aran Reviewers: tuomaspelkonen, jungejason, aran CC: anjali, aran, epriestley Differential Revision: 320
1 parent deb80b7 commit 386a5ee

File tree

11 files changed

+260
-42
lines changed

11 files changed

+260
-42
lines changed

externals/javelin

Submodule javelin updated from c614793 to d9a1cb4

src/__celerity_resource_map__.php

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,6 @@
179179
),
180180
'disk' => '/rsrc/css/application/differential/revision-comment-list.css',
181181
),
182-
0 =>
183-
array(
184-
'uri' => '/res/39de799e/rsrc/js/javelin/docs/Base.js',
185-
'type' => 'js',
186-
'requires' =>
187-
array(
188-
0 => 'javelin-install',
189-
),
190-
'disk' => '/rsrc/js/javelin/docs/Base.js',
191-
),
192182
'differential-revision-detail-css' =>
193183
array(
194184
'uri' => '/res/ea9de420/rsrc/css/application/differential/revision-detail.css',
@@ -225,15 +215,6 @@
225215
),
226216
'disk' => '/rsrc/css/application/diffusion/commit-view.css',
227217
),
228-
'diffusion-source-css' =>
229-
array(
230-
'uri' => '/res/415aad1a/rsrc/css/application/diffusion/diffusion-source.css',
231-
'type' => 'css',
232-
'requires' =>
233-
array(
234-
),
235-
'disk' => '/rsrc/css/application/diffusion/diffusion-source.css',
236-
),
237218
'herald-css' =>
238219
array(
239220
'uri' => '/res/5051f3ab/rsrc/css/application/herald/herald.css',
@@ -475,6 +456,19 @@
475456
),
476457
'disk' => '/rsrc/js/application/maniphest/behavior-transaction-controls.js',
477458
),
459+
'javelin-behavior-maniphest-transaction-expand' =>
460+
array(
461+
'uri' => '/res/966410de/rsrc/js/application/maniphest/behavior-transaction-expand.js',
462+
'type' => 'js',
463+
'requires' =>
464+
array(
465+
0 => 'javelin-behavior',
466+
1 => 'javelin-dom',
467+
2 => 'javelin-workflow',
468+
3 => 'javelin-stratcom',
469+
),
470+
'disk' => '/rsrc/js/application/maniphest/behavior-transaction-expand.js',
471+
),
478472
'javelin-behavior-maniphest-transaction-preview' =>
479473
array(
480474
'uri' => '/res/44e86555/rsrc/js/application/maniphest/behavior-transaction-preview.js',
@@ -539,6 +533,16 @@
539533
),
540534
'disk' => '/rsrc/js/javelin/lib/DOM.js',
541535
),
536+
0 =>
537+
array(
538+
'uri' => '/res/39de799e/rsrc/js/javelin/docs/Base.js',
539+
'type' => 'js',
540+
'requires' =>
541+
array(
542+
0 => 'javelin-install',
543+
),
544+
'disk' => '/rsrc/js/javelin/docs/Base.js',
545+
),
542546
'javelin-event' =>
543547
array(
544548
'uri' => '/res/25c7c9e8/rsrc/js/javelin/core/Event.js',
@@ -562,7 +566,7 @@
562566
),
563567
'javelin-json' =>
564568
array(
565-
'uri' => '/res/315c8b24/rsrc/js/javelin/lib/JSON.js',
569+
'uri' => '/res/1c4e3f6a/rsrc/js/javelin/lib/JSON.js',
566570
'type' => 'js',
567571
'requires' =>
568572
array(
@@ -607,7 +611,7 @@
607611
),
608612
'javelin-stratcom' =>
609613
array(
610-
'uri' => '/res/d3f4599a/rsrc/js/javelin/core/Stratcom.js',
614+
'uri' => '/res/9e7eb62b/rsrc/js/javelin/core/Stratcom.js',
611615
'type' => 'js',
612616
'requires' =>
613617
array(
@@ -764,7 +768,7 @@
764768
),
765769
'maniphest-transaction-detail-css' =>
766770
array(
767-
'uri' => '/res/8e196c52/rsrc/css/application/maniphest/transaction-detail.css',
771+
'uri' => '/res/0a35f731/rsrc/css/application/maniphest/transaction-detail.css',
768772
'type' => 'css',
769773
'requires' =>
770774
array(
@@ -998,7 +1002,7 @@
9981002
'uri' => '/res/pkg/33f413ef/typeahead.pkg.js',
9991003
'type' => 'js',
10001004
),
1001-
'7d23deb1' =>
1005+
'ce1d51a9' =>
10021006
array (
10031007
'name' => 'javelin.pkg.js',
10041008
'symbols' =>
@@ -1014,7 +1018,7 @@
10141018
8 => 'javelin-json',
10151019
9 => 'javelin-uri',
10161020
),
1017-
'uri' => '/res/pkg/7d23deb1/javelin.pkg.js',
1021+
'uri' => '/res/pkg/ce1d51a9/javelin.pkg.js',
10181022
'type' => 'js',
10191023
),
10201024
'ed383f69' =>
@@ -1052,30 +1056,30 @@
10521056
'differential-revision-history-css' => '314934dc',
10531057
'differential-table-of-contents-css' => '314934dc',
10541058
'diffusion-commit-view-css' => '03ef179e',
1055-
'javelin-behavior' => '7d23deb1',
1059+
'javelin-behavior' => 'ce1d51a9',
10561060
'javelin-behavior-aphront-basic-tokenizer' => '33f413ef',
10571061
'javelin-behavior-differential-diff-radios' => 'ed383f69',
10581062
'javelin-behavior-differential-edit-inline-comments' => 'ed383f69',
10591063
'javelin-behavior-differential-feedback-preview' => 'ed383f69',
10601064
'javelin-behavior-differential-populate' => 'ed383f69',
10611065
'javelin-behavior-differential-show-more' => 'ed383f69',
10621066
'javelin-behavior-workflow' => '122a6b6d',
1063-
'javelin-dom' => '7d23deb1',
1064-
'javelin-event' => '7d23deb1',
1065-
'javelin-install' => '7d23deb1',
1066-
'javelin-json' => '7d23deb1',
1067+
'javelin-dom' => 'ce1d51a9',
1068+
'javelin-event' => 'ce1d51a9',
1069+
'javelin-install' => 'ce1d51a9',
1070+
'javelin-json' => 'ce1d51a9',
10671071
'javelin-mask' => '122a6b6d',
1068-
'javelin-request' => '7d23deb1',
1069-
'javelin-stratcom' => '7d23deb1',
1072+
'javelin-request' => 'ce1d51a9',
1073+
'javelin-stratcom' => 'ce1d51a9',
10701074
'javelin-tokenizer' => '33f413ef',
10711075
'javelin-typeahead' => '33f413ef',
10721076
'javelin-typeahead-normalizer' => '33f413ef',
10731077
'javelin-typeahead-ondemand-source' => '33f413ef',
10741078
'javelin-typeahead-preloaded-source' => '33f413ef',
10751079
'javelin-typeahead-source' => '33f413ef',
1076-
'javelin-uri' => '7d23deb1',
1077-
'javelin-util' => '7d23deb1',
1078-
'javelin-vector' => '7d23deb1',
1080+
'javelin-uri' => 'ce1d51a9',
1081+
'javelin-util' => 'ce1d51a9',
1082+
'javelin-vector' => 'ce1d51a9',
10791083
'javelin-workflow' => '122a6b6d',
10801084
'phabricator-core-buttons-css' => '1ef6c6f9',
10811085
'phabricator-core-css' => '1ef6c6f9',

src/__phutil_library_map__.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@
250250
'ManiphestDAO' => 'applications/maniphest/storage/base',
251251
'ManiphestReplyHandler' => 'applications/maniphest/replyhandler',
252252
'ManiphestTask' => 'applications/maniphest/storage/task',
253+
'ManiphestTaskDescriptionChangeController' => 'applications/maniphest/controller/descriptionchange',
253254
'ManiphestTaskDetailController' => 'applications/maniphest/controller/taskdetail',
254255
'ManiphestTaskEditController' => 'applications/maniphest/controller/taskedit',
255256
'ManiphestTaskListController' => 'applications/maniphest/controller/tasklist',
@@ -692,6 +693,7 @@
692693
'ManiphestDAO' => 'PhabricatorLiskDAO',
693694
'ManiphestReplyHandler' => 'PhabricatorMailReplyHandler',
694695
'ManiphestTask' => 'ManiphestDAO',
696+
'ManiphestTaskDescriptionChangeController' => 'ManiphestController',
695697
'ManiphestTaskDetailController' => 'ManiphestController',
696698
'ManiphestTaskEditController' => 'ManiphestController',
697699
'ManiphestTaskListController' => 'ManiphestController',

src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ public function getURIMap() {
157157
'task/' => array(
158158
'create/$' => 'ManiphestTaskEditController',
159159
'edit/(?P<id>\d+)/$' => 'ManiphestTaskEditController',
160+
'descriptionchange/(?P<id>\d+)/$' =>
161+
'ManiphestTaskDescriptionChangeController',
160162
),
161163
'transaction/' => array(
162164
'save/' => 'ManiphestTransactionSaveController',

src/applications/diffusion/controller/history/__init__.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
phutil_require_module('phabricator', 'view/layout/panel');
1515

1616
phutil_require_module('phutil', 'markup');
17-
phutil_require_module('phutil', 'parser/uri');
1817
phutil_require_module('phutil', 'utils');
1918

2019

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?php
2+
3+
/*
4+
* Copyright 2011 Facebook, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
class ManiphestTaskDescriptionChangeController extends ManiphestController {
20+
21+
private $transactionID;
22+
23+
public function willProcessRequest(array $data) {
24+
$this->transactionID = $data['id'];
25+
}
26+
27+
public function processRequest() {
28+
29+
$request = $this->getRequest();
30+
$user = $request->getUser();
31+
32+
$transaction = id(new ManiphestTransaction())->load($this->transactionID);
33+
if (!$transaction) {
34+
return new Aphront404Response();
35+
}
36+
37+
$transactions = array($transaction);
38+
39+
$phids = array();
40+
foreach ($transactions as $transaction) {
41+
foreach ($transaction->extractPHIDs() as $phid) {
42+
$phids[$phid] = $phid;
43+
}
44+
}
45+
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();
46+
47+
$factory = new DifferentialMarkupEngineFactory();
48+
$engine = $factory->newDifferentialCommentMarkupEngine();
49+
50+
$view = new ManiphestTransactionDetailView();
51+
$view->setTransactionGroup($transactions);
52+
$view->setHandles($handles);
53+
$view->setMarkupEngine($engine);
54+
$view->setRenderSummaryOnly(true);
55+
$view->setRenderFullSummary(true);
56+
57+
return id(new AphrontAjaxResponse())->setContent($view->render());
58+
}
59+
60+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
/**
3+
* This file is automatically generated. Lint this module to rebuild it.
4+
* @generated
5+
*/
6+
7+
8+
9+
phutil_require_module('phabricator', 'aphront/response/404');
10+
phutil_require_module('phabricator', 'aphront/response/ajax');
11+
phutil_require_module('phabricator', 'applications/differential/parser/markup');
12+
phutil_require_module('phabricator', 'applications/maniphest/controller/base');
13+
phutil_require_module('phabricator', 'applications/maniphest/storage/transaction');
14+
phutil_require_module('phabricator', 'applications/maniphest/view/transactiondetail');
15+
phutil_require_module('phabricator', 'applications/phid/handle/data');
16+
17+
phutil_require_module('phutil', 'utils');
18+
19+
20+
phutil_require_source('ManiphestTaskDescriptionChangeController.php');

0 commit comments

Comments
 (0)