# Create new project from Bitbucket Server shows only to letter D

**URL:** <https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376>\
**Category:** SonarQube Server / Community Build\
**Tags:** bitbucket, sonarqube\
**Created:** [April 21, 2020, 8:50am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376 "2020-04-21T08:50:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![imre.austa](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@imre.austa](https://community.sonarsource.com/u/imre.austa)\
**Post date:** [April 21, 2020, 8:50am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/1 "2020-04-21T08:50:16Z")

</div>

Hi!

When Creating new project and selecting “From a Bitbucket Server repository” I only get Project results until the letter D. I need to be able to search for all results. Is this a bug or is it possible to configure how many results are fetched from Bitbucket?

I am using Sonarqube Developer Edition Version 8.2 and Bitbucket Server v7.1.1

Br,  
Imre

---

<div class="post-metadata">

**Author:** ![imre.austa](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@imre.austa](https://community.sonarsource.com/u/imre.austa)\
**Post date:** [April 21, 2020, 10:15am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/2 "2020-04-21T10:15:57Z")

</div>

Ok I guess Sonarqube uses this API to get list of projects:  
/rest/api/latest/projects?name&permission

This is a paged API and returns by default only 25 items. In our case exactly to the projects starting with D. If you add limit parameter to the query then the number of items can be modified. For example /api/latest/projects?name&permission&limit=1000 returns all projects.

Is it possible to change API query that Sonarqube uses to include the limit parameter?

Br,  
Imre

---

<div class="post-metadata">

**Author:** ![pierreguillot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pierreguillot/32/46022_2.png) [@pierreguillot](https://community.sonarsource.com/u/pierreguillot)\
**Post date:** [April 21, 2020, 10:42am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/3 "2020-04-21T10:42:32Z")

</div>

Hi, Welcome to the community!

I understand your concern, and at the same time, it does not seems reasonable to display 1000 projects at a time: how would you find the one you are looking for in the list anyway?

Have you tried to use the search box? Any feedback on that ?

---

<div class="post-metadata">

**Author:** ![imre.austa](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@imre.austa](https://community.sonarsource.com/u/imre.austa)\
**Post date:** [April 21, 2020, 10:53am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/5 "2020-04-21T10:53:36Z")

</div>

Hi!

The search box searches from the same data returned by the API query so as a result its not possible to add repository that is not inclued in first 25 projects. In our case we have 136 projects in Bitbucket. By default the project repo list is not expanded so it would be ok to return ~200 projects but the problem is not displaying the projects/repos but rather its not possible to add them at all.

The api query for 136 projects is lightning fast so there are no performance problems also that should limit the number of returned projects.

Br,  
Imre

---

<div class="post-metadata">

**Author:** ![pierreguillot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pierreguillot/32/46022_2.png) [@pierreguillot](https://community.sonarsource.com/u/pierreguillot)\
**Post date:** [April 21, 2020, 11:12am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/6 "2020-04-21T11:12:09Z")

</div>

> [@imre.austa](#):
>
> The search box searches from the same data returned by the API query so as a result its not possible to add repository that is not inclued in first 25 projects.

This is surprising, and it should not be the case. The search query is totally independent from the list query, and allow you to search along all your repositories. For example, what happen if you type the exact name of your repository in the search box ?

---

<div class="post-metadata">

**Author:** ![imre.austa](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@imre.austa](https://community.sonarsource.com/u/imre.austa)\
**Post date:** [April 21, 2020, 11:42am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/7 "2020-04-21T11:42:19Z")

</div>

Hmm that is indeed strange then. No luck when searching by exact repo name or Project/Repo.

Br,  
Imre

---

<div class="post-metadata">

**Author:** ![pierreguillot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pierreguillot/32/46022_2.png) [@pierreguillot](https://community.sonarsource.com/u/pierreguillot)\
**Post date:** [April 21, 2020, 12:18pm UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/8 "2020-04-21T12:18:22Z")

</div>

If i remember correctly, the BibucketServer API we use for search support only the “start with” pattern. Maybe this is something worth mentioning in the search box in SonarQube.

---

<div class="post-metadata">

**Author:** ![imre.austa](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@imre.austa](https://community.sonarsource.com/u/imre.austa)\
**Post date:** [April 21, 2020, 1:43pm UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/9 "2020-04-21T13:43:25Z")

</div>

Sorry can you elaborate how to use this “start with”?

Br,  
Imre

---

<div class="post-metadata">

**Author:** ![pierreguillot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pierreguillot/32/46022_2.png) [@pierreguillot](https://community.sonarsource.com/u/pierreguillot)\
**Post date:** [April 21, 2020, 2:32pm UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/10 "2020-04-21T14:32:18Z")

</div>

If your repository is named, lets say `abc def ghi`, the search will match only if you enter `a`, `ab`, `abc d` and so on. The search won’t find your project if you type `def`, or start anywhere after the first character of the name of the repo.

---

<div class="post-metadata">

**Author:** ![imre.austa](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@imre.austa](https://community.sonarsource.com/u/imre.austa)\
**Post date:** [April 21, 2020, 3:35pm UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/11 "2020-04-21T15:35:49Z")

</div>

Ah ok, you are correct that search only finds repository if you start typing from beginning but in this case its not the problem. The search bar only finds those repositories that are in the first 25 projects that are displayed on the page. This is regardless how I have input the repository name. If you say that search should be independent from the project display and return results for all repositories in Bitbucket then I guess this can be classified as a bug.

Br,  
Imre

---

<div class="post-metadata">

**Author:** ![undecided2013](https://avatars.discourse-cdn.com/v4/letter/u/b5ac83/32.png) [@undecided2013](https://community.sonarsource.com/u/undecided2013)\
**Post date:** [June 5, 2020, 7:58pm UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/13 "2020-06-05T19:58:49Z")

</div>

This is indeed a bug, I have the same issue

p.s. Something weird is going on. In the web.log file I see that ALL the repos are listed. Something in the UI is filtering them

---

<div class="post-metadata">

**Author:** ![ajanuary-evertz](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@ajanuary-evertz](https://community.sonarsource.com/u/ajanuary-evertz)\
**Post date:** [July 24, 2020, 2:51pm UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/14 "2020-07-24T14:51:12Z")

</div>

Also hitting this issue. It’s only showing the top 25 projects. Within one of the first 25 projects, I can search for repositories even if the project contains more than 25 repositories, but I can find nothing past the first 25 projects.

---

<div class="post-metadata">

**Author:** ![chakilams3](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@chakilams3](https://community.sonarsource.com/u/chakilams3)\
**Post date:** [August 21, 2020, 9:21am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/15 "2020-08-21T09:21:48Z")

</div>

Same issue here. Did someone manage to get the resolution for it ?

---

<div class="post-metadata">

**Author:** ![pierreguillot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pierreguillot/32/46022_2.png) [@pierreguillot](https://community.sonarsource.com/u/pierreguillot)\
**Post date:** [August 25, 2020, 3:25pm UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/17 "2020-08-25T15:25:17Z")

</div>

Hi, let me try to clarify:

- without searching, we return max 25 repository for every BBS Project
- while searching, we return max 25 repository, all projects mixed

Does that clarify? This is the expected behaviour.

---

<div class="post-metadata">

**Author:** ![imre.austa](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@imre.austa](https://community.sonarsource.com/u/imre.austa)\
**Post date:** [August 26, 2020, 7:25am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/18 "2020-08-26T07:25:10Z")

</div>

Hi!

But the actual behaviour is that even while searching it will display results only from the first 25 repositories. I have in total about 300 repos in BB but I can search only from the first 25 but all the others cannot be found at all regardless of what I write in the search.

Br,  
Imre

---

<div class="post-metadata">

**Author:** ![pierreguillot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pierreguillot/32/46022_2.png) [@pierreguillot](https://community.sonarsource.com/u/pierreguillot)\
**Post date:** [August 26, 2020, 10:06am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/19 "2020-08-26T10:06:32Z")

</div>

> [@imre.austa](#):
>
> it will display results only from the first 25 repositories.

I’m having a hard time to understand this, do you mean amongst the 25 repositories that you saw without the search?

What happens if you type the exact name of one of the projects you can’t find?

---

<div class="post-metadata">

**Author:** ![imre.austa](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@imre.austa](https://community.sonarsource.com/u/imre.austa)\
**Post date:** [August 26, 2020, 11:04am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/20 "2020-08-26T11:04:09Z")

</div>

If the repository is not in the list of first 25 repositories of the entire BB instance then this repository is not found when searching.

---

<div class="post-metadata">

**Author:** ![pierreguillot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pierreguillot/32/46022_2.png) [@pierreguillot](https://community.sonarsource.com/u/pierreguillot)\
**Post date:** [August 26, 2020, 11:52am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/21 "2020-08-26T11:52:03Z")

</div>

I’m sorry, I’m not able to reproduce this issue. Under the hood, SonarQube is querying this BitBucketServer endpoint:

`https://yourinstance.com/rest/api/1.0/repos?projectname=&name=xxxx`

Could you please open this in your browser, replace `xxxx` with your project name, and see if you get any result?

---

<div class="post-metadata">

**Author:** ![imre.austa](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@imre.austa](https://community.sonarsource.com/u/imre.austa)\
**Post date:** [August 28, 2020, 9:25am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/22 "2020-08-28T09:25:23Z")

</div>

Sorry, it was my mistake, its not 25 repos. What I mean is that SQ is able to fetch only data from first 25 projects from Bitbucket and when you want to search for a specific repository you only get results from the first 25 projects. If the repo is under lets say the 50th project in BB then it cannot be found

---

<div class="post-metadata">

**Author:** ![pierreguillot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pierreguillot/32/46022_2.png) [@pierreguillot](https://community.sonarsource.com/u/pierreguillot)\
**Post date:** [August 28, 2020, 11:23am UTC](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376/23 "2020-08-28T11:23:34Z")

</div>

Hi, still, it would be valuable to do the test i indicated in my previous message.

[Next page](https://community.sonarsource.com/t/create-new-project-from-bitbucket-server-shows-only-to-letter-d/23376.md?page=2)
