diff --git a/src/config/SprintConfigOptions.php b/src/config/SprintConfigOptions.php index 5835e6e1132370fec664aab70e1d64aad8ea3142..6758f7f6268bc5e4fb03032f0ae08866c430dd8a 100644 --- a/src/config/SprintConfigOptions.php +++ b/src/config/SprintConfigOptions.php @@ -99,6 +99,12 @@ final class SprintConfigOptions pht( "Phragile charts are provided by an external application at https://phragile.wmflabs.org". "\n\n.")), + $this->newOption('sprint.phragile-uri', 'string', 'https://phragile.wmflabs.org/sprints/') + ->setSummary(pht('URI where Phragile is installed.')) + ->setDescription( + pht( + 'Set the URI where Phragile is installed.')) + ->addExample('https://phragile.wmflabs.org/sprints/', pht('Valid Setting')), ); } diff --git a/src/events/BurndownActionMenuEventListener.php b/src/events/BurndownActionMenuEventListener.php index 9b29fee0d419efe5fec1d37100408a5bfcced688..42ba3c404f9230f8e162b00bda2c54c5479ce61e 100644 --- a/src/events/BurndownActionMenuEventListener.php +++ b/src/events/BurndownActionMenuEventListener.php @@ -72,8 +72,8 @@ final class BurndownActionMenuEventListener extends PhabricatorEventListener { $project = $event->getValue('object'); $projectid = $project->getId(); - - $phragile_uri = 'https://phragile.wmflabs.org/sprints/'.$projectid; + $phragile_base_uri = PhabricatorEnv::getEnvConfig('sprint.phragile-uri'); + $phragile_uri = $phragile_base_uri.$projectid; $view_uri = '/project/sprint/view/'.$projectid; $board_uri = '/project/sprint/board/'.$projectid;