[Team Plan - URGENT] Cannot Set Main Branch + No Issue Export Option — Org Admin | Monday Presentati

URGENT — Team Plan Customer | $190/month | 300k LOC | Organization: thinkhat
Presentation to management scheduled for Monday — early response greatly appreciated.


Hi Sonar Community,

We are currently implementing SonarCloud for our organization under the Team Plan (300k Private LOC, USD 190/month). Our subscription is linked to sast@thinkhat.ai. Frontend and Backend scans are configured successfully via Bitbucket Pipelines and completing as expected.

However, we are facing two blockers we need urgent help with:


:large_blue_diamond: Issue 1 — Cannot Switch / Set Main Branch

Our Bitbucket repositories have both master and main branches.

Observed behaviour:

  • master branch → SonarCloud correctly treats it as Long-Lived (Main) → full results show :white_check_mark:
  • main branch → SonarCloud treats it as Short-Lived → no dashboard results :cross_mark:

Problem: Although I am both a Bitbucket Workspace Admin and SonarCloud Organization Admin, I cannot find any option to:

  • Switch the Main Branch
  • Set another branch as Main Branch
  • Change long-lived branch configuration

Questions:

  1. Is this functionality available on the Team Plan?
  2. Is additional permission or project-level setting required?
  3. Why is the “Set as Main Branch” option not visible for our organization?

:large_blue_diamond: Issue 2 — No Issue Export Option Available

After completing scans, we need to share identified issues with our development teams. However, we cannot find any option to export issues from the SonarCloud UI (Excel, CSV, or PDF).

Questions:

  1. Does the Team Plan include built-in issue export functionality?
  2. Is any additional permission or admin role required to enable this?
  3. What is the recommended approach for exporting and distributing issues to developers?

:large_blue_diamond: Issue 3 — Admin Capabilities

As both Bitbucket Workspace Admin and SonarCloud Organization Admin, we expected full administrative access. Are there any project-level permissions, org settings, or plan limitations preventing these options from appearing?

This request is urgent, as we are scheduled to demonstrate our SonarCloud implementation to management on Monday. We would greatly appreciate your earliest response.

If needed, I can provide screenshots, project details, or "schedule a short meeting (Google Meet, Zoom, or Microsoft Teams) to review the configuration".


Environment Details:

  • Plan: Team Plan — 300k Private LOC — USD 190/month
  • Organization Key: thinkhat
  • Source Control: Bitbucket Cloud
  • Projects: thinkhat_noki-fe, thinkhat_noki-be
  • Pipeline: Bitbucket Pipelines with sonarsource/sonarcloud-scan:4.0.0

Happy to provide screenshots or additional details if needed.

Thank you for your support.

Samili Shresta

Hi Team,

Thank you for reviewing our query. We have a management demonstration scheduled for wednesday and would appreciate guidance on the following implementation points so we can finalize the rollout correctly:

  • Main branch / long-lived branch configuration when both main and master exist

  • Project-level permissions required for branch management

  • Recommended approach for exporting issues for developer distribution

  • Validation of the Bitbucket Pipeline integration and repository binding

If a SonarCloud moderator or engineer can help validate the recommended configuration, it would be greatly appreciated. We are standardizing this setup across multiple applications and want to ensure we follow the supported approach.

Thank you.

Hey @Samili_Shresta, welcome to the Community!

  1. Unfortunately, manually setting the main branch is not directly supported. The workaround is to rename the current SonarQube Cloud main branch (after deleting any existing branch with the same name), then re-running analysis. Note that this action will remove all branch data for the old main branch.
  2. The Team plan doesn’t include a built-in issue export/reporting capability. Enterprise regulatory reports can produce ZIPs containing CSV/PDF/TXT, but that capability starts at Enterprise, not Team. The workaround is to the Web API instead. You could look into GET api/issues/search (docs), it will return a JSON which you could then convert into a CSV with a bit of scripting.

Hi Andrés,

Thank you for the clarification. This confirms that the missing “Set as Main Branch” option is expected behavior and not a permission issue on our side.

We understand that the supported workaround is to:

  1. Delete the existing branch with the target name in SonarCloud.

  2. Rename the current Main branch in SonarCloud.

  3. Re-run the analysis so the new branch becomes the Main (long-lived) branch.

We also understand that the Team Plan does not include a built-in issue export/reporting feature, and that the recommended approach is to use the Web API (api/issues/search) and generate CSV/Excel reports externally. We have already implemented an API/manual export automation and are validating it for developer reporting.

One follow-up question: after renaming the current Main branch and re-running the analysis, will the new branch be treated as the permanent Main (long-lived) branch for future analyses, or are there any additional steps required to ensure the mapping is retained?

Thank you again for your guidance.

The main branch won’t change by itself. In principle, the main branch on SonarQube Cloud is fixed, it doesn’t change.

By the way, we have an item in our roadmap to enable changing the main branch manually. Feel free to vote for it! We are aware that there are some cases when this is necessary, we just haven’t gotten to implement it yet.

Thank you for the clarification, Andrés. This confirms that the Main branch is fixed once created in SonarQube Cloud and will not change automatically, which helps us understand the behavior we observed with main and master.

We’ll proceed with validating our current branch configuration and will plan the branch-renaming workaround carefully, since it removes the historical data of the existing Main branch.

Thank you also for sharing the roadmap update regarding manual Main branch switching. We’ll vote for the feature request, as it would be very helpful for organizations managing multiple repositories and long-lived branch strategies.

We appreciate your guidance and the quick responses.