# Transfer a project from one organisation to another

**URL:** <https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249>\
**Category:** SonarQube Cloud\
**Tags:** sonarqube-cloud\
**Created:** [July 24, 2023, 3:35pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249 "2023-07-24T15:35:47Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![0neel](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/0neel/32/47564_2.png) [@0neel](https://community.sonarsource.com/u/0neel)\
**Post date:** [July 24, 2023, 3:35pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/1 "2023-07-24T15:35:47Z")

</div>

Hi, thanks for the great product! We use SonarCloud as a hub for all our code-quality metrics and really happy with it.

Currently we’d like to transfer one of repositories from one GitHub organisation to another one and so we’d also like to do the same for the corresponding SonarCloud project (transfer it from one SonarCloud organisation to another).

I’ve found some related topics saying this is not currently possible and we have to recreate the project:

- [Moving Github organisations in Sonar Cloud and changing it in sonarcloud](https://community.sonarsource.com/t/moving-github-organisations-in-sonar-cloud-and-changing-it-in-sonarcloud/43372)
- [Change GitHub organization name and reset the organization binding, but our project is still bound](https://community.sonarsource.com/t/change-github-organization-name-and-reset-the-organization-binding-but-our-project-is-still-bound/74032)
- [Move projects between organizations](https://community.sonarsource.com/t/move-projects-between-organizations/24958)

That would be a disaster for us since we’ll lose all the historical data which is valuable for us.

Could you please recommend us a way to resolve that not loosing all the project data?  
Some of the similar topics mention that the SonarCloud team can exceptionally change bindings manually. Is that possible in our case?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [July 25, 2023, 1:34pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/2 "2023-07-25T13:34:16Z")

</div>

Hi,

Is the historical data you’re concerned about the record of the project’s evolution (historic metric values) or issue manipulations (False Positive, Won’t Fix, comments, etc)?

Because the project evolution could be recreated by using the `sonar.projectDate` [analysis parameter](https://docs.sonarcloud.io/advanced-setup/analysis-parameters/).

Regarding rebinding, I know we no longer rebind organizations. You can vote for adding a rebinding feature [here](https://portal.productboard.com/sonarsource/1-sonarcloud/c/416-migrate-a-project-from-one-devops-platform-to-another). Altho that feature is about organization rebinding, so you’ll want to be explicit that you’re looking for project rebinding.

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![0neel](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/0neel/32/47564_2.png) [@0neel](https://community.sonarsource.com/u/0neel)\
**Post date:** [July 25, 2023, 4:07pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/3 "2023-07-25T16:07:27Z")

</div>

Thanks for the info!  
Could you clarify some things for me please?

> [@ganncamp](#):
>
> Is the historical data you’re concerned about the record of the project’s evolution (historic metric values) or issue manipulations (False Positive, Won’t Fix, comments, etc)?

I’d like to save as much as possible. So ideally I’d like to keep both project’s evolution and issue manipulations. I assume you say that saving (or recreating/restoring) the latter is not possible. Is that correct?

> [@ganncamp](#):
>
> Because the project evolution could be recreated by using the `sonar.projectDate` [analysis parameter](https://docs.sonarcloud.io/advanced-setup/analysis-parameters/).

Does it mean we’ll have to manually run analysis on every version we’d like to add to the history?

BTW we always specify the `sonar.projectVersion` parameter, would SonarCloud order analysis runs according to it if don’t specify the `sonar.projectDate` parameter?

> [@ganncamp](#):
>
> Regarding rebinding, I know we no longer rebind organizations.

Does it mean there is no way (even manual) to rebind the project? We’re into any possible option.  
If that’s not possible what would happen to the SonarCloud project once we transfer our repo to a different GitHub organisation?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [July 25, 2023, 4:41pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/4 "2023-07-25T16:41:15Z")

</div>

Hi,

> [@0neel](#):
>
> I’d like to save as much as possible. So ideally I’d like to keep both project’s evolution and issue manipulations. I assume you say that saving (or recreating/restoring) the latter is not possible. Is that correct?

It’s not. Not natively. It would be possible to use the APIs to pull a list of FP/WF issues. Then you would have to map them to the issues created in the new clone by file/line number/rule id. From there you could re-FP/WF the clone’s issues, but you’re still going to lose the context of who and when they were initially marked (unless you want to stuff that into an issue comment).

> [@0neel](#):
>
> Does it mean we’ll have to manually run analysis on every version we’d like to add to the history?

Yes. In order. So checkout the initial commit. Set `sonar.projectDate` to that value`. Analyze. Increment the date. GoTo 1. Note that [housekeeping](https://docs.sonarcloud.io/digging-deeper/housekeeping/) cleans old analyses out automatically, so you should skip selectively through history.

> [@0neel](#):
>
> would SonarCloud order analysis runs according to it if don’t specify the `sonar.projectDate` parameter?

No. `sonar.projectVersion` is _just_ a string.

> [@0neel](#):
>
> Does it mean there is no way (even manual) to rebind the project?

That’s correct. That’s why you want to vote for that feature.

> [@0neel](#):
>
> what would happen to the SonarCloud project once we transfer our repo to a different GitHub organisation?

Ehm… I think it would just languish, unanalyzed in SonarCloud. You would probably need to clean it out manually when you were done with any data transfer you wanted to do.

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![0neel](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/0neel/32/47564_2.png) [@0neel](https://community.sonarsource.com/u/0neel)\
**Post date:** [July 26, 2023, 5:00pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/5 "2023-07-26T17:00:44Z")

</div>

> [@ganncamp](#):
>
> It’s not. Not natively. It would be possible to use the APIs to pull a list of FP/WF issues.

That’s unfortunate. Thanks, I’ll take a look at those APIs to check if we’re ready to go that way.

> [@ganncamp](#):
>
> Yes. In order.

Oh, that’s a lot of manual work to do. Not sure it worths efforts, but thanks for the idea. Perhaps we’ll just dump historical data somehow.

> [@ganncamp](#):
>
> Ehm… I think it would just languish, unanalyzed in SonarCloud.

Would that be ok to keep the project just for the sake of keeping the historical data?

> [@ganncamp](#):
>
> You would probably need to clean it out manually

By cleaning out do you mean delete the project?

Anyway, I think I’ve got enough info on that topic so feel free to close it after you clarify the above questions. Thanks a lot for your help!

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [July 26, 2023, 5:06pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/6 "2023-07-26T17:06:14Z")

</div>

Hi,

> [@0neel](#):
>
> Would that be ok to keep the project just for the sake of keeping the historical data?

I think I remember some unanalyzed open source projects being cleaned out within the last few months as a first step in more regular housekeeping. (And I have no other details on that.) So you would want to keep an eye on that and watch announcements to see if other cleanup was going to happen.

And on the other hand, if it’s a private project, then it will cost you to maintain every month.

> [@0neel](#):
>
> By cleaning out do you mean delete the project?

Yes.

> [@0neel](#):
>
> Thanks a lot for your help!

Happy to ☺

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![0neel](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/0neel/32/47564_2.png) [@0neel](https://community.sonarsource.com/u/0neel)\
**Post date:** [August 1, 2023, 2:14pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/7 "2023-08-01T14:14:34Z")

</div>

> [@ganncamp](#):
>
> Ehm… I think it would just languish, unanalyzed in SonarCloud. You would probably need to clean it out manually when you were done with any data transfer you wanted to do.

Turns out that’s not the behaviour we actually got.

We transferred the repo to another organization but we still able to send results to the old SonarCloud project. It doesn’t report the results back to GitHub though.

Also, now when I try to import the transfered repo to the new SonarCloud organization it says that the project is imported already. What are we supposed to do in that case? Should we actually delete the project from the old organization to import it to the new one?

 ![Screenshot 2023-08-01 at 16.10.50](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/8/d/8d4c1eb4020aad8fe90b2907db6ae0d20d130c02.png)

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [August 1, 2023, 3:01pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/8 "2023-08-01T15:01:26Z")

</div>

Hi,

> [@0neel](#):
>
> We transferred the repo to another organization but we still able to send results to the old SonarCloud project.

Well… yeah. But why would you do that?

> [@0neel](#):
>
> Also, now when I try to import the transfered repo to the new SonarCloud organization it says that the project is imported already.

The UI is telling you the project is already imported into the organization you’re currently logged in to. Which one is that? The old one or the new one?

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![0neel](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/0neel/32/47564_2.png) [@0neel](https://community.sonarsource.com/u/0neel)\
**Post date:** [August 1, 2023, 3:19pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/9 "2023-08-01T15:19:06Z")

</div>

> [@ganncamp](#):
>
> Well… yeah. But why would you do that?

Not like we really want to do that. Just an observation. I honestly didn’t expect being able to do that.

> [@ganncamp](#):
>
> The UI is telling you the project is already imported into the organization you’re currently logged in to. Which one is that? The old one or the new one?

Both organizations are added to my account (I’m an admin in both of them) and it doesn’t seem I can log out from them separately (I only see an option to log out from my account).

Currently the list of projects in the new organization is empty but when I try to add the transferred repo it is displayed as already imported in the list of repositories of the new organization. It’s not displayed in the list of the repositories of the old organization.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [August 1, 2023, 3:35pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/10 "2023-08-01T15:35:46Z")

</div>

Hi,

> [@0neel](#):
>
> Not like we really want to do that. Just an observation. I honestly didn’t expect being able to do that.

As you said, you still own / have access to both orgs. So where your analysis results go depends on the analysis parameters. I.e. you need to change your `sonar.organization` value.

> [@0neel](#):
>
> Both organizations are added to my account (I’m an admin in both of them) and it doesn’t seem I can log out from them separately (I only see an option to log out from my account).

Yep. My mistake.

> [@0neel](#):
>
> Currently the list of projects in the new organization is empty but when I try to add the transferred repo it is displayed as already imported in the list of repositories of the new organization. It’s not displayed in the list of the repositories of the old organization.

Okay, this deserves a new thread, please.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![0neel](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/0neel/32/47564_2.png) [@0neel](https://community.sonarsource.com/u/0neel)\
**Post date:** [August 1, 2023, 3:50pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/11 "2023-08-01T15:50:44Z")

</div>

> [@ganncamp](#):
>
> Okay, this deserves a new thread, please.

Here we go [Can't import project after transferring the repo](https://community.sonarsource.com/t/cant-import-project-after-transferring-the-repo/96669)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [August 8, 2023, 3:51pm UTC](https://community.sonarsource.com/t/transfer-a-project-from-one-organisation-to-another/96249/12 "2023-08-08T15:51:35Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
