Pull Request in Jira Issue and Bitbucket Repo out of sync

strobelLuetze March 26, 2018

I have a little Issue:

I linked a Jira Issue to a Bitbucket Branch (opened the branch in Jira)

After merging it with a pull request Jira still shows the pull request as "OPEN".

image.png

image.png

 

Is there a way to resync the bitbucket repo?

 

Thanks

Stefan

5 answers

2 votes
Edwin Miltenburg June 3, 2020

RESOLVED:

  1. Create a new branch on a linked Bitbucket, using the same issue key in the branch name.
  2. This will force JIRA to update the dev-status summary of the issue. The summary is cached in the database separately from the details.
  3. Then of course delete the empty branch.
2 votes
Josiah Eubank June 6, 2019

This is resolved for server in Bitbucket 6.3.0 (https://jira.atlassian.com/browse/BSERV-10578)

From the server issue the following command (replace localhost:7990 as necessary)

curl -v -u <bitbucket-username> -p -H "Accept: application/json" -H "Content-Type: application/json" -d "{}" http://localhost:7990/rest/jira-dev/1.0/projects/<project>/repos/<repo-slug>/reindex?withCommits=true

 You will have to repeat this per repository that you need to reindex

Tomasz Kosinski July 1, 2019

It does not fix the problem. Still some pull requests are reported as opened in Jira

Dalectric
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2020

This fixed the issue for me, it took a few minutes for it to be updated but eventually JIRA is correct again.

BB 6.8.2 and JIRA 8.2.4

0 votes
Dave Sammel May 20, 2019

Hi guys, I am having the same problem: In a few cases, pull requests that are merged from the Bitbucket web interface continue to show as being open in Jira. As shown in Stefan's screenshot, it also shows that there is a branch open, although in reality it was deleted by Bitbucket when the pull request was merged.

The vast majority of the time, this does not occur, and within seconds of merging the pull request in Bitbucket, the "development" status in Jira correctly changes to merged.

Has anyone actually found a way to fix this?

Thanks and best regards,
Dave

0 votes
Tomasz Kosinski September 7, 2018

I have exactly the same problem with on-premises Jira & Bitbucket.

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

Hi Stefan,

What version of Jira and Bitbucket are in use here?

Could you check this issue again today?  Just wanted to see how much time has elapse from the time of the 2nd pull request in Bitbucket, until now. 

Many times when users see this it can happen because of a configuration problem on bitbucket side that is not configured to push a webhook to Jira.   Please see Slow Appearing Commits from BitBucket or GitHub in JIRA for more details.

However if after waiting 60 minutes and Jira still does not accurately reflect this information, there might be something else wrong here.

strobelLuetze March 27, 2018

Hi Andrew,

thanks for the reply.

 

The versions in use are:

Jira: 7.8.1

Bitbucket Server: 5.9.0

 

The pull request status of this Issue is still wrong today.

All the other Issues work fine. The problem exists only in this single issue. So I guess the Application link works as it should.

Because of some bugs I had to reopen this Issue after merging the first pull request. I created a new branch with the suggested name from Jira (the same as the initial feature branch). The second pull request was declined at first, reopened after some further commits, approved and finally merged(feature branch deleted).

Maybe there is an Issue when reopnening an issue and creating branches with the same name as merged branches... If this is the case I will stop doing this and create a new Issue instead...

To fix this single Issue is there a way to resync the wrong state? This is printed everywhere as Unresolved, but it is resolved...

Suggest an answer

Log in or Sign up to answer