mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Fix a JS error when adding a project card directly to a subproject from a workboard
Summary: Fixes T12152. When creating a subproject task directly from a parent project, we can get column information back about the subproject column, which isn't visible. Just ignore this rather than trying to draw a card into a column which does not exist. This flow (see test plan) is a little unintuitive since the card never appears on the workboard, but this class of things is probably roughly somewhere in T4900. Test Plan: - Create a parent project A. - Create subproject B. - On the workboard for A, select "Create Task..." from the dropdown. - Add tag "B" in the dialog that pops up. - Save the task. Note that this flow creates a task tagged only with "B", since "A" and "B" are mutually exclusive tags. Before patch: UI freezes (JX.Mask is never removed), JS error in console. After patch: workflow completes. Note that card is (correctly) not visible: it's in an invisible subproject column. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12152 Differential Revision: https://secure.phabricator.com/D17242
This commit is contained in:
parent
e9e4c6f6a0
commit
61216dc641
2 changed files with 19 additions and 12 deletions
|
@ -439,7 +439,7 @@ return array(
|
|||
'rsrc/js/application/phortune/phortune-credit-card-form.js' => '2290aeef',
|
||||
'rsrc/js/application/policy/behavior-policy-control.js' => 'd0c516d5',
|
||||
'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '5e9f347c',
|
||||
'rsrc/js/application/projects/WorkboardBoard.js' => 'fe7cb52a',
|
||||
'rsrc/js/application/projects/WorkboardBoard.js' => '8935deef',
|
||||
'rsrc/js/application/projects/WorkboardCard.js' => 'c587b80f',
|
||||
'rsrc/js/application/projects/WorkboardColumn.js' => '21df4ff5',
|
||||
'rsrc/js/application/projects/WorkboardController.js' => '55baf5ed',
|
||||
|
@ -765,7 +765,7 @@ return array(
|
|||
'javelin-view-renderer' => '6c2b09a2',
|
||||
'javelin-view-visitor' => 'efe49472',
|
||||
'javelin-websocket' => 'e292eaf4',
|
||||
'javelin-workboard-board' => 'fe7cb52a',
|
||||
'javelin-workboard-board' => '8935deef',
|
||||
'javelin-workboard-card' => 'c587b80f',
|
||||
'javelin-workboard-column' => '21df4ff5',
|
||||
'javelin-workboard-controller' => '55baf5ed',
|
||||
|
@ -1573,6 +1573,15 @@ return array(
|
|||
'javelin-stratcom',
|
||||
'javelin-dom',
|
||||
),
|
||||
'8935deef' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
'phabricator-draggable-list',
|
||||
'javelin-workboard-column',
|
||||
),
|
||||
'8a41885b' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
|
@ -2249,15 +2258,6 @@ return array(
|
|||
'javelin-view-visitor',
|
||||
'javelin-util',
|
||||
),
|
||||
'fe7cb52a' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
'phabricator-draggable-list',
|
||||
'javelin-workboard-column',
|
||||
),
|
||||
'fea0eb47' => array(
|
||||
'javelin-install',
|
||||
),
|
||||
|
|
|
@ -204,7 +204,14 @@ JX.install('WorkboardBoard', {
|
|||
|
||||
if (!this._templates[phid]) {
|
||||
for (var add_phid in response.columnMaps) {
|
||||
this.getColumn(add_phid).newCard(phid);
|
||||
var target_column = this.getColumn(add_phid);
|
||||
|
||||
if (!target_column) {
|
||||
// If the column isn't visible, don't try to add a card to it.
|
||||
continue;
|
||||
}
|
||||
|
||||
target_column.newCard(phid);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue