If you are using the default Jira-Bitbucket server integration, it works based on the issue key provided in the commit message. It's not exactly a project in JIRA to Bitbucket Repository integration. That being said you can use REST API in Bitbucket to get the changesets associated with a issue key and issue keys associated with commits in a specific pull request. So you can use this data and possibly generate the mapping between project in jira and repository relation.
Please see for retails on REST api available REST Resources Provided By: Bitbucket Server - JIRA Integration
You can find more details about jira integration in jira integration.
Regards
Prasanth - Atlassian
Hi Prasanth,
so does that mean that Jira project and GIT repo are not tightly couple.
for example if i have project A in Jira and we have repository in Bitbucket like repo1,repo2,repo3 so any commit done on repo1 can link to any issuse in jira until that user is part of that project.we would like to know how can we force the user to use a particular repo with particular project in Jira.
currently i see only way is to do permission from project level in Jira which will allow user to access repo of that project only where it has access to Jira of that project.
Please let us know your view on this.
DJM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can implement this with Commit Policy Plugin for Jira plus its adapter for Bitbucket by setting up a custom commit policy for the Bitbucket repo.
The commit policy should contain a JQL condition with a query like this (not tested):
project in projectsWhereUserHasRole("Developers")
This requires the committer to mention issue key(s) from project(s) where he has the "Developer" role.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Manage Confluence like never before! This new learning path teaches you how to manage content, users, and permissions while optimizing user experience. Built for admins at all levels who want to confidently lead and unlock more innovative collaboration.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.