1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00

Make lipsum project generator also fill in project description

Summary:
`./bin/lipsum` allows to fill up a Phorge instance with bogus data for testing. When creating a project, the code creates a project title, project status, random subscribers/members and picks a random project creator, but does not set a project description.

Make this code also set a project description (which is implemented as a custom field).

Closes T15748

Test Plan:
* On the CLI, use `./bin/lipsum generate projects` to create a bogus project.
* In the web browser, go to `/project/query/all/` and open the project page of the recently created bogus project: See no project description.
* Apply this change.
* On the CLI, use `./bin/lipsum generate projects` to create another bogus project.
* In the web browser, go to `/project/query/all/` and open the project page of the recently created bogus project: See a random project description.

Reviewers: O1 Blessed Committers, 20after4

Reviewed By: O1 Blessed Committers, 20after4

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15748

Differential Revision: https://we.phorge.it/D25545
This commit is contained in:
Andre Klapper 2024-02-29 16:22:08 +01:00
parent 892f527b9f
commit 179f866deb

View file

@ -19,6 +19,12 @@ final class PhabricatorProjectTestDataGenerator
PhabricatorProjectNameTransaction::TRANSACTIONTYPE,
$this->newProjectTitle());
$xactions[] = id(new PhabricatorProjectTransaction())
->setTransactionType(PhabricatorTransactions::TYPE_CUSTOMFIELD)
->setOldValue('')
->setMetadataValue('customfield:key', 'std:project:internal:description')
->setNewValue($this->newProjectTitle());
$xactions[] = $this->newTransaction(
PhabricatorProjectStatusTransaction::TRANSACTIONTYPE,
$this->newProjectStatus());