Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: returns default start date for Sprints to now and end date to now + 2 weeks if unset ......................................................................
returns default start date for Sprints to now and end date to now + 2 weeks if unset Change-Id: I4b6e7325e69901af6dcd7a618f5d79d7238ed1ba --- M src/query/SprintQuery.php 1 file changed, 10 insertions(+), 8 deletions(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved diff --git a/src/query/SprintQuery.php b/src/query/SprintQuery.php index e133cd1..676d8b9 100644 --- a/src/query/SprintQuery.php +++ b/src/query/SprintQuery.php @@ -45,10 +45,11 @@ $start = idx($aux_fields, 'isdc:sprint:startdate') ->getProxy()->getFieldValue(); if (is_null($start)) { - $help = pht('To do this, go to the Project Edit Details Page'); - throw new BurndownException("The project \"".$this->project->getName() - ."\" is not set up for Sprint because " - ."it has not been assigned a start date\n", $help); + // $help = pht('To do this, go to the Project Edit Details Page'); + // throw new BurndownException("The project \"".$this->project->getName() + // ."\" is not set up for Sprint because " + // ."it has not been assigned a start date\n", $help); + return PhabricatorTime::getNow(); } else { return $start; } @@ -58,10 +59,11 @@ $end = idx($aux_fields, 'isdc:sprint:enddate') ->getProxy()->getFieldValue(); if (is_null($end)) { - $help = pht('To do this, go to the Project Edit Details Page'); - throw new BurndownException("The project \"".$this->project->getName() - ."\" is not set up for Sprint because " - ."it has not been assigned an end date\n", $help); +// $help = pht('To do this, go to the Project Edit Details Page'); +// throw new BurndownException("The project \"".$this->project->getName() +// ."\" is not set up for Sprint because " +// ."it has not been assigned an end date\n", $help); + return PhabricatorTime::getNow() + 1209600; } else { return $end; } -- To view, visit https://gerrit.wikimedia.org/r/206147 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4b6e7325e69901af6dcd7a618f5d79d7238ed1ba Gerrit-PatchSet: 3 Gerrit-Project: phabricator/extensions/Sprint Gerrit-Branch: master Gerrit-Owner: Christopher Johnson (WMDE) <christopher.john...@wikimedia.de> Gerrit-Reviewer: Christopher Johnson (WMDE) <christopher.john...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits