> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-organization/setting-config-at-org-level/setting-new-code-definition-at-organization-level.md).

# Setting new code definition

SonarQube Cloud Project administrators can set the default the new code definition.

The new code option defined at the organization level (if any) is applied by default to all *new* projects. At the organization level, you can only select the Previous version or Number of days option (by default, no option is selected). Project administrators can change this setting for their project. For more information about the new code options, see [Quality standards and new code](/sonarqube-cloud/standards/about-new-code.md).

To set the new code definition for your organization (you must be an organization admin):

1. Retrieve your organization. See [Retrieving your organizations](/sonarqube-cloud/getting-started/viewing-organizations.md) for more information.
2. Go to **Administration** > **New Code**.
3. Select the new code option.
4. Select **Save**.

<figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-997b5dbb7d6ec72e8fbe23556d247cebe28bbdfe%2Forganization-admin-new-code.png?alt=media" alt="New code definition in the organization&#x27;s administration"><figcaption></figcaption></figure>

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

* [Quality standards and new code](/sonarqube-server/2025.3/user-guide/about-new-code.md)
* [Configuring new code calculation](/sonarqube-server/2025.3/project-administration/configuring-new-code-calculation.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-organization/setting-config-at-org-level/setting-new-code-definition-at-organization-level.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
