# 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 [Managing your project's quality gate](/sonarqube-server/2025.5/project-administration/changing-quality-gate-and-fudge-factor.md) 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 (or disassociating) a quality gate with (from) 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 right panel’s **Projects** section, select the **With** (to view only the associated projects), **Without** (to view only the not associated projects) or **All** tab.
4. Select or unselect the projects you want to associate or disassociate with / from the quality gate.

<figure><img src="/files/e4iNpQwyqQLzrxAgWQ4m" 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>

* [Understanding quality gates](/sonarqube-server/2025.5/quality-standards-administration/managing-quality-gates/introduction-to-quality-gates.md)
* [Viewing a quality gate](/sonarqube-server/2025.5/quality-standards-administration/managing-quality-gates/viewing-quality-gate.md)
* [Managing custom quality gates](/sonarqube-server/2025.5/quality-standards-administration/managing-quality-gates/managing-custom-quality-gates.md)
* [Changing instance's default quality gate](/sonarqube-server/2025.5/quality-standards-administration/managing-quality-gates/changing-default-quality-gate.md)
* [Subscribing to notifications](/sonarqube-server/2025.5/user-guide/managing-your-account/subscribing-to-notifications.md)
* [Managing your project's quality gate](/sonarqube-server/2025.5/project-administration/changing-quality-gate-and-fudge-factor.md)
* Changing the quality gate fudge factor:
  * [Quality standards](/sonarqube-server/2025.5/instance-administration/analysis-functions/quality-standards.md)
  * [Managing your project's quality gate](/sonarqube-server/2025.5/project-administration/changing-quality-gate-and-fudge-factor.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/2025.5/quality-standards-administration/managing-quality-gates/associating-projects-with-quality-gate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
