Reindex JIRA issue keys in Bitbucket Server/Datacenter

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

A reindex may be required when one of the following problems arises.

Bitbucket Server

If the "Commit" view in Bitbucket Server doesn't show links to JIRA under the Issues column or doesn't show new JIRA issues in this column and neither of these known issues is the cause:

BSERV-3403 - Getting issue details... STATUS

BSERV-4287 - Getting issue details... STATUS

JIRA

The development panel in JIRA is not showing an updated status of the commits, branches or pull requests.


Solution

Case #1

When the problem is on the Bitbucket Server side or related to the commits in JIRA:

If the issue is seen on multiple Bitbucket repositories

  1. Create a backup before continuing.
  2. Shut down the Bitbucket Server.
  3. Remove the contents of the <BITBUCKET_HOME>/shared/data/snapshots directory.
    (info) This operation removes references in snapshots directories for all the repositories in Bitbucket.
  4. Start Bitbucket server.
  5. Push a commit to the repository with the JIRA issue key in the commit message to force a reindex of the data.
    (info) Please note the reindex operation is triggered only for the repository where the commit event is pushed. To trigger reindexing for multiple repositories, push a commit to each Bitbucket repository specifying Jira Issue key in the commit message. 

If the issue is seen on a specific Bitbucket repository, 

Get the repository ID in Bitbucket following steps mentioned in the KB Identifying a repository's ID in Bitbucket Server

  1. Create a backup before continuing.
  2. Shut down the Bitbucket Server.
  3. Remove the contents of the <BITBUCKET_HOME>/shared/data/snapshots/<repository_ID> directory.
  4. Start Bitbucket server.
  5. Push a commit to the repository with the JIRA issue key in the commit message to force a reindex of the data.
    (info) The commit event triggers a reindex operation for the repository in Bitbucket.

Read more here: Using custom JIRA issue keys

Note that this reindex will not remove any of the old JIRA keys from the index. It will just trigger the indexing to start from the beginning again. The snapshot contains the hashes of the refs it has already indexed and is updated after each indexing run. Data related to JIRA issue keys are stored in the cs_attribute and cs_repo_membership tables in Bitbucket. Please don't modify these tables unless it's recommended by Atlassian.

Case #2

It is currently not possible to update the development panel for the following problems:

  • the status of a pull request is incorrect
  • a branch is missing or incorrect

The following bug is available for tracking:  BSERV-9452 - Getting issue details... STATUS

Last modified on Feb 17, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.