Hello,
After updating Jira Server from 8.19.1 to 8.21.0 and Bitbucket Server from 7.15.0 to 7.19.0, I have issues with existing branches and pull requests

Steps to reproduce :
When I click on a branch or pr link, it shows an error "You don't have access to view all related pull requests. Please contact your administrator." or "You don't have access to view all related branches. Please contact your administrator."

API request from browser console :
GET https://<myjira>/rest/dev-status/1.0/issue/detail?issueId=<myid>&applicationType=stash&dataType=pullrequest
{
"errors": [],
"detail": [
{
"branches": [],
"pullRequests": [],
"repositories": [],
"_instance": {
"applicationLinkId": "<myappid>",
"baseUrl": "https://<mybitbucket>",
"primary": true,
"singleInstance": false,
"name": "PopupBucket",
"typeName": "Bitbucket Server",
"id": "<myappid>",
type": "stash"
}
}
]
}
Actions :
I performed a full reindex, deleted the bitbucket link (both ways), tried Oauth and Oauth with impersonation methods but it didn't fix it.
Workaround :
New branches and PRs are not impacted and the workaround to fix existing PRs is to close then reopen them. It also fixes the branch link at the same time.


{
"errors": [],
"detail": [
{
"branches": [
{
"name": "ESKP-77-correction-des-btl-de-top-plate",
"url":
...