change default branch name in jira

We have integrated JIRA ondemand with bitbucket and love the fact that you can create a new feature branch from an issue. What we'd like is to change the default value of the branch name field to something lite "feature/<issue-key><issuename>".

Couldn't find an option to do that. Is it possible?

Br

Joakim

11 answers

1 accepted

This widget could not be displayed.

Hi there, this is an error on our part.

The branch types attribute is only available for Stash when using the new Create Branch feature that is supported by Bitbucket. Inside of JIRA we currently have a general 'What's new' page that is the same for behind the firewall and OnDemand.

I'll check with our JIRA team to see if we can get this fixed, sorry for any confusion this has caused.

Cheers, Justen -- Bitbucket product manager

Is there an update for this? Been almost a year now. If this has been done can you point me to where the documentation is as I can't seem to get this working.

Now 2 years! This is a basic change and very critical to improving the efficiency of the tools

I'd love to have some flexibility regarding the branch names in Bitbucket. Any updates?

An implementation would be a nice way to celebrate the 4th anniversary of this feature request :)

This widget could not be displayed.

To follow up on my own question. In the "What's new in JIRA 6.1" dialog that pops up when you enter ondemand there seems to have been added an option "branch type" which would solve my problem. But we don't get that option in our system. Is this not rolled out yet or do we have to configure it?

We'd love to see this as well. Our default branch naming scheme includes the year and month the branch was cut.

This widget could not be displayed.

Hello

Hopefully this will be of use to some people. I am a fan of Tampermonkey scripts to tamper with websites to do what I want. In a need for this feature I have implemented this short script:

 

// ==UserScript==
// @name         Bitbucket: Better branch name
// @namespace    https://www.playitsoftware.com
// @version      1.0
// @author       You
// @match        https://bitbucket.org/branch/create*
// @grant        none
// ==/UserScript==
 
(function() {
    'use strict';
    var issueType = (window.location.href.match(/&amp;issueType=([^&amp;]+)&amp;/) || [])[1];
    
    var prefix = '';
    switch(issueType)
    {
        case 'Bug': prefix = 'fix/'; break;
        default: prefix = 'feature/'; break;
    }
    
    $('#id_branch_name').val(prefix + $('#id_branch_name').val()).trigger('change');
})();

 

It pulls the issueType from the href and prepends the appropriate prefix to the branch name. Feel free to tweak for our own prefixing needs.

Jason

Hey Jason,

This is in fact extremely useful! Thank you!

Tom Hart I'm New Here Wednesday

Awesome, thanks!

This widget could not be displayed.

We are also looking for this functionality with download JIRA (6.2) and Bitbucket. The branch type should be based on the issue type, so if I create a branch from a new feature or enhancement issue, the branch name would be e.g. feature/ABC-123, but if I create from a bug issue, then the branch name would be e.g. bugfix/ABC-456.

This widget could not be displayed.

I +1 for this to be supported in Bitbucket too. We use git-flow and the missing branch type with Jira and Bitbucket is stopping us from using in-Jira branching.

This widget could not be displayed.

+1 for this. We like to have the user's name in the branch:

myname/PR-123-feature-number-one-two-three

It would be nice if you Let the user build their branch names with the following variables:

  • Issue Type (bug/feature/etc)
  • Epic Name
  • Username
  • Issue Number
  • Issue Description

Thus currently the setting would be ${Issue Number}-${Issue Description}, and I would be able to accomplish what I want with ${Username}/${Issue Number}-${Issue Description}.

I think that would solve it for pretty much everyone here.

 

This widget could not be displayed.

+1

This widget could not be displayed.

+1 for us too

By the way, everyone should check out the feature request here: https://jira.atlassian.com/browse/BSERV-8746 and upvote

This widget could not be displayed.

@Fraser Hardy A workaround for using the git/hg-flow extensions is to prefix the auto generated branch name with feature/ and your flow commands should work as expected. Cheers!

This widget could not be displayed.

How can I do that? Can´t find any documentation.

This widget could not be displayed.

any update?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

535 views 23 15
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you