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
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?
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 ?
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.
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 ?
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.
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.
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.
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.
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.
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