Add a workflow to a project/branch

The following steps are based on the workflow described at the start of this chapter, see Workflow: a step-by-step walk-through.

This section only describes how to add the Workflow and Minimum up votes to a project and a project branch. For a description of the other project settings, see Adding a project.

  1. On the Swarm Projects page, click the + Add Project button to add a new project.

    Note
    • The ability to add projects can be limited to administrators only, or limited to members of specific groups. When limited, users who are not administrators, or a member of the specified group, will not see the + Add Project button.
    • By default, any member of a project can edit the project's configuration. Administrators can configure Swarm to prevent changes to the project's name and branch definition(s).
    Tip

    If sharing is switched off for a workflow, any projects or branches that were associated with the workflow while it was shared will remain associated with it.

    If you edit a project or branch associated with that unshared workflow, you will still see the name of the workflow in the Workflow field, even if you don't own that workflow. If you remove that workflow from the project/branch you will not be able to see the workflow in the Workflow dropdown list unless you own it.

    The project Settings page is displayed:

    Add Project Page image
  2. Minimum up votes: For this example set to 3.

    A review cannot be approved until all of the Required reviewers have voted up the review and the Minimum up votes specified has been satisfied.

    • If a review spans projects/branches, the Minimum up votes for each of the projects and branches must be satisfied before you can approve the review.
    • Required reviewers are included when up votes are counted.
    • When Count votes up from is set to Members for a workflow associated with a project/branch, only the up votes of members of the project contribute to satisfying the Minimum up votes for a project/branch. For more information about the Count votes up from rule, see Workflow rules.
    • Important

      If the Workflow feature is disabled, all votes are counted not just votes from project members.

    Important

    If the Minimum up votes required is set higher than the number of reviewers that exist for a review, approval will be blocked for that review. This is true even if all the reviewers on the review have voted up the review.

  3. Workflow: For this example select the workflow you created in the Create a workflow section.

    Tip
    • When a workflow is associated with a project, the workflow is used for all of the branches in that project.
    • When a project branch is associated with a workflow, the workflow of the parent project is ignored and the branch workflow is used.

    For more information about workflows and how project workflows interact with branch workflows, see Workflow basics.

  4. Click + Add Branch to add a new branch.

    Branch Drop-down Dialog image
    1. Workflow For this example leave workflow set to Inherit from project so that the Main branch uses the workflow you set on the project.

      Tip
      • When a workflow is associated with a project, the workflow is used for all of the branches in that project.
      • When a project branch is associated with a workflow, the workflow of the parent project is ignored and the branch workflow is used.

      For more information about workflows and how project workflows interact with branch workflows, see Workflow basics.

    2. Minimum up votes: For this example leave set to Inherit from project so that the Main branch uses the setting you set on the project.

      A review cannot be approved until all of the Required reviewers have voted up the review and the Minimum up votes specified has been satisfied.

      • If a review spans projects/branches, the Minimum up votes for each of the projects and branches must be satisfied before you can approve the review.
      • Required reviewers are included when up votes are counted.
      • When Count votes up from is set to Members for a workflow associated with a project/branch, only the up votes of members of the project contribute to satisfying the Minimum up votes for a project/branch. For more information about the Count votes up from rule, see Workflow rules.
      • Important

        If the Workflow feature is disabled, all votes are counted not just votes from project members.

      Important

      If the Minimum up votes required is set higher than the number of reviewers that exist for a review, approval will be blocked for that review. This is true even if all the reviewers on the review have voted up the review.

  5. Click Save.

    Note

    The Save button is disabled if any required fields are empty.

    Important

    It is possible to create a project that you cannot edit. This can happen if you have specified owners but not yourself as an owner, or if you have not specified yourself as a member. Swarm can detect some (but not all) such situations when you save a project; when it does detect such a situation, a warning dialog is displayed.

    If you see this dialog, click Continue to save the project without your ownership/membership, or click Cancel within the dialog to continue editing the project. The project page's Save and Cancel buttons are disabled while this dialog is visible.

  6. You can now use Swarm Workflow on reviews in this project.