# Associating a quality gate with projects

The default quality gate is associated with all projects that are not explicitly associated with a quality gate. You can explicitly associate a project with a quality gate:

* At the quality gate level with the Administer Quality Gates permission. The procedure is explained below.
* At the project level with the Administer Quality Gates permission or the Administer Project permission. See the [changing-quality-gate-and-fudge-factor](https://docs.sonarsource.com/sonarqube-server/project-administration/adjusting-analysis/changing-quality-gate-and-fudge-factor "mention") page for more details.

## Last setting overrides principle without a hierarchy <a href="#last-setting-overrides-without-hierarchy" id="last-setting-overrides-without-hierarchy"></a>

The "last setting overrides" principle applies without a hierarchy: the most recently configured setting will take precedence over all previous settings. For example:

1. From the **Quality Gates** page, you first associate quality gate 1 with project 1.
2. Still from the **Quality Gates** page, you associate quality gate 2 with project 1. Project 1 is now associated with quality gate 2.
3. From project 1’s settings, you associate project 1 with quality gate 3. Project 1 is now associated with quality gate 3 (the setting is updated in the **Quality Gates** page).
4. From the **Quality Gates** page, you associate quality gate 1 with project 1. Project 1 is now associated with quality gate 1 (the setting is updated in project 1’s settings).

{% hint style="warning" %}
To avoid misconfigurations, we recommend that in your instance, you perform explicit associations either from the **Quality Gates** page or from the project settings, but not from both.
{% endhint %}

## Associating a quality gate with projects <a href="#associating-quality-gate-with-projects" id="associating-quality-gate-with-projects"></a>

1. In the top navigation bar, select **Quality Gates**.
2. In the left panel, select the quality gate you want to manage.
3. In the **Projects** section, select the **With** tab to view the associated projects, **Without** tab to view the unassociated projects, or the **All** tab.
4. Select or unselect the projects you want to associate or disassociate with the quality gate.

<figure><img src="https://2744305742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VWSqvZ4eaBLWvA6epdv%2Fuploads%2Frm1Fg0jczgh0ypRVGhGQ%2Fquality-gate-projects.png?alt=media&#x26;token=62c955c2-7611-42b6-b29e-a8f085406da8" alt="Navigate to your quality gate in SonarQube Server to see (and manage) a list of projects that use that quality gate."><figcaption></figcaption></figure>

## Related pages <a href="#related-pages" id="related-pages"></a>

* [introduction-to-quality-gates](https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/managing-quality-gates/introduction-to-quality-gates "mention")
* [viewing-quality-gate](https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/managing-quality-gates/viewing-quality-gate "mention")
* [managing-custom-quality-gates](https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/managing-quality-gates/managing-custom-quality-gates "mention")
* [changing-default-quality-gate](https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/managing-quality-gates/changing-default-quality-gate "mention")
* [subscribing-to-notifications](https://docs.sonarsource.com/sonarqube-server/user-guide/managing-your-account/subscribing-to-notifications "mention")
* [changing-quality-gate-and-fudge-factor](https://docs.sonarsource.com/sonarqube-server/project-administration/adjusting-analysis/changing-quality-gate-and-fudge-factor "mention")
* Changing the quality gate fudge factor:
  * [quality-standards](https://docs.sonarsource.com/sonarqube-server/instance-administration/analysis-functions/quality-standards "mention")
  * [changing-quality-gate-and-fudge-factor](https://docs.sonarsource.com/sonarqube-server/project-administration/adjusting-analysis/changing-quality-gate-and-fudge-factor "mention")
