Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix #87 change message depending on job are being scheduled or launched

  • Loading branch information...
commit 1dcaf20cbf51810d95d0ade39a2b51ae3c1a639d 1 parent 277fea5
@srogier srogier authored
View
10 apps/front/modules/jenkins/actions/rebuildBranchAction.class.php
@@ -15,10 +15,16 @@ public function execute($request)
$groupRun = JenkinsGroupRunPeer::retrieveBySfGuardUserIdAndGitBranchSlug($userId, $branchName);
$this->forward404If(null === $groupRun, sprintf('Can\'t retrieve JenkinsGroupRun with branch name %s and user id %s', $branchName, $userId));
- $groupRun->rebuild($this->getJenkins(), $request->getParameter('delayed') == 1);
+ $delayed = $request->getParameter('delayed') == 1;
+ $groupRun->rebuild($this->getJenkins(), $delayed);
JenkinsRunPeer::fillEmptyJobBuildNumber($this->getJenkins(), $this->getUser()->getUserId());
- $this->getUser()->setFlash('info', sprintf('The build [%s] has been relaunched', $groupRun->getLabel()));
+ $message = $delayed ?
+ sprintf('The jobs of build [%s] have been added to the delayed list', $groupRun->getLabel()) :
+ sprintf('The build [%s] has been relaunched', $groupRun->getLabel())
+ ;
+
+ $this->getUser()->setFlash('info', $message);
$this->redirect($this->generateUrl('branch_view', $groupRun));
}
Please sign in to comment.
Something went wrong with that request. Please try again.