Summary
In Bitbucket 5, the /projects page only shows the first 100 items in alphanumeric order. The remaining items are shown in insertion order.
In addition some project links may be duplicated or missing completely due to insertion order.
Steps to Reproduce
- Start an instance of Bitbucket 4.14
- Insert projects "TEST001" through to "TEST150" in random order
- Confirm /projects shows all items in alphanumeric order
- Upgrade the same instance to 5.0
For reference, I inserted the 150 projects via a python script, like so:
import random import requests BITBUCKET_URL = 'http://localhost:7990' BITBUCKET_USER = 'admin' BITBUCKET_PASS = 'admin' auth = (BITBUCKET_USER, BITBUCKET_PASS) # Create a list of project keys TEST001 --> TEST150 projects = ['TEST' + str(i).zfill(3) for i in range(1,151)] # Randomise the list random.shuffle(projects) for p in projects: data = {'key': p, 'name': 'Project {}'.format(p)} r = requests.post(BITBUCKET_URL + '/rest/api/1.0/projects', json=data, auth=auth)
Expected Results
All items should be in alphanumeric order
Actual Results
After the first 100 projects, the remaining projects are displayed in insertion order (i.e. by PROJECT.ID)