mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 10:42:41 +01:00
24a6eeb8d8
Summary: Fixes T5677. - Instead of using `sequence == 0` to mean "this is the backlog column", flag the column explicitly. - Migrate existing sequence 0 columns to have the flag. - Add the flag when initializing or copying a board. - Remove special backlog logic when reordering columns. Test Plan: - Migrated columns, viewed some boards, they looked identical. - Reordered the backlog column a bunch of times (first, last, middle, dragged other stuff around). - Added tasks to a project, saw them show up in the reordered backlog. - Initialized a new board and saw a backlog column show up. - Copied an existing board and saw the backlog column come over. - Tried to hide a backlog column. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5677 Differential Revision: https://secure.phabricator.com/D10189
24 lines
513 B
PHP
24 lines
513 B
PHP
<?php
|
|
|
|
$table = new PhabricatorProjectColumn();
|
|
$conn_w = $table->establishConnection('w');
|
|
|
|
foreach (new LiskMigrationIterator($table) as $column) {
|
|
$id = $column->getID();
|
|
|
|
echo "Adjusting column {$id}...\n";
|
|
if ($column->getSequence() == 0) {
|
|
|
|
$properties = $column->getProperties();
|
|
$properties['isDefault'] = true;
|
|
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET properties = %s WHERE id = %d',
|
|
$table->getTableName(),
|
|
json_encode($properties),
|
|
$id);
|
|
}
|
|
}
|
|
|
|
echo "Done.\n";
|