Creating a new branch/merge request from issue page should be configurable
### Summary
The changes implemented in gitlab-ce!10018 set the action to create a merge request as default in the dropdown box on the issue page. Depending on your workflow this really is not a good idea, especially when often rebasing branches the MR becomes very huge and unclear. We usually don't want to see every iteration of the code, so we only create a merge request when the code is ready for a first round of reviews. Having to set the dropdown to new branch every time is annoying.
### Steps to reproduce
Create an issue. On the issue page the dropdown box selects "Create merge request" by default.
### What is the current *bug* behavior?
Creating a new merge request is the default in the dropdown box on the issue page.
### What is the expected *correct* behavior?
Creating a branch should be the default. Alternatively the default should be configurable per GitLab instance.
### Possible fixes
Dirty hack to make "New branch" the default selection:
```
diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml
index dba092c884..df7f5ee0d2 100644
--- a/app/views/projects/issues/_new_branch.html.haml
+++ b/app/views/projects/issues/_new_branch.html.haml
@@ -6,11 +6,11 @@
%span.text
Checking branch availability…
.btn-group.available.hide
- %input.btn.js-create-merge-request.btn-inverted.btn-success{ type: 'button', value: 'Create a merge request', data: { action: 'create-mr' } }
+ %input.btn.js-create-merge-request.btn-inverted.btn-success{ type: 'button', value: 'Create a branch', data: { action: 'create-branch' } }
%button.btn.btn-inverted.dropdown-toggle.btn-inverted.btn-success.js-dropdown-toggle{ type: 'button', data: { 'dropdown-trigger' => '#create-merge-request-dropdown' } }
= icon('caret-down')
%ul#create-merge-request-dropdown.dropdown-menu.dropdown-menu-align-right{ data: { dropdown: true } }
- %li.droplab-item-selected{ role: 'button', data: { value: 'create-mr', 'text' => 'Create a merge request' } }
+ %li{ role: 'button', data: { value: 'create-mr', 'text' => 'Create a merge request' } }
.menu-item
.icon-container
= icon('check')
@@ -19,7 +19,7 @@
%span
Creates a merge request named after this issue, with source branch created from '#{@project.default_branch}'.
%li.divider.droplab-item-ignore
- %li{ role: 'button', data: { value: 'create-branch', 'text' => 'Create a branch' } }
+ %li.droplab-item-selected{ role: 'button', data: { value: 'create-branch', 'text' => 'Create a branch' } }
.menu-item
.icon-container
= icon('check')
```
issue