Can I add multiple keys under link to issue keys ?

Jalpesh Rajani June 27, 2022

I would like to add multiple keys from multiple jira projects under link keys settings. However am not sure if multiple keys are accepted.

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2022

Hello @Jalpesh Rajani ,

Thank you for reaching out to Atlassian Support.

You can definitely link the repository to more than one Jira project, but the Link Key settings under repository settings are automatically done for you once you connect your bitbucket cloud instance with your Jira cloud instance.

In case you want to link additional projects to a repository in Bitbucket, from multiple jira projects, you can follow the below steps : 

  1. In your repository navigation panel, click Jira issues. In the issue list, select the folder icon located at the top right-hand side and click Manage linked projects.

  2. In the dialog, select a project from the dropdown, then click Link project.

Then, once you include the jira issue key in the commit messages for that repository, these commit will be linked to the respective Jira project.

More details on how to link/unline Jira projects are outlined in the below documentation :

Hope that helps! Let me know in case you have any questions.

Thank you, @Jalpesh Rajani .

Kind regards,

Patrik S

Jalpesh Rajani June 28, 2022

Thanks @Patrik S however my question is on a different page. We have a links option in bitbucket settings where I can add jira project keys. If the key is not present with a ticket number in the commit message, the push is blocked. If I need to add for multiple jira projects, I need to add each individually. Can I do it in one insert?

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2022

Hey @Jalpesh Rajani ,

Are you referring to Repository Settings >> Links page? If possible, could you share a screenshot of the page you are referring to? 

Jalpesh Rajani June 28, 2022

Yes this section. 

Screenshot 2022-06-29 at 9.57.30 AM.pngScreenshot 2022-06-29 at 9.57.48 AM.png

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 29, 2022

Hello @Jalpesh Rajani ,

When you push your changes to bitbucket cloud and add a jira issue key in the commit message, Bitbucket will automatically link the repository being pushed with the corresponding Jira Project, considering you have already connected Bitbucket with your Jira instance.

However, in case you want to manually connect the repository to a given Jira project, you need to use a different menu, as I shared previously : 

 

  • In your repository navigation panel, click Jira issues. In the issue list, select the folder icon located at the top right-hand side and click Manage linked projects.

  • In the dialog, select a project from the dropdown, then click Link project.

 

The dropdown will show all the Jira projects you currently have permission to link, and you will be able to select and add them individually.

Kind regards,

Patrik S 

Jalpesh Rajani June 30, 2022

Yep I understand.

 

what I am looking for is blocking commits from being pushed to repo if it does not have the jira key, which is what the links helps with. 

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 4, 2022

Hello @Jalpesh Rajani ,

When you integrate your Bitbucket workspace with a Jira Cloud instance, a read-only link like the below should be created automatically in your workspace : 

Screen Shot 2022-07-04 at 11.48.08.png

This is a generic regex that will match any issue key in that Jira instance when you reference the issue key in the commit message.

So when toggle the option "Require issue keys in commit messages", you will be able to commit using different issue keys without needing to add an individual link to each of them. You will only be blocked from committing if you use a issue key that is not present in any of the connected Jira instances.

In this case, you can confirm if your repository has that generic link created, and if not, you can try to remove and recreate the Jira integration with your Bitbucket workspace, so the link will be automatically created for you.

Let me know if you have any questions.

Thank you, @Jalpesh Rajani .

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events