March 28th 1 PM ET
Free Workshop: Escape the chaos of context-switching

Git Integration for Jira Self-Managed (Data Center/Server) Documentation

Branch and pull request settings (formerly Git Integration Options)

This setting is part of the General Settings configuration page.

This setting affects git branches creation default names and toggles for git pull/merge request options for the Jira issue.

 

Personal access token

For more details on this setting, see Require User PAT general setting.

 

Git branches

These settings will take effect at integration level for projects with connected GitLab/GitHub git hosts. The default state for each setting is enabled.

  • Enable create/delete branch in Jira issues  –  shows or hides the function for creating of branches. The ability to delete selected branches from the Jira developer panel is dependent on this setting.

  • Branch name template  –  see below.

  • Branch name templates inner separator  –  set which inner word separator to use for the branch name template. The default setting is "-" (dash).

  • Max branch name length  –  specify the maximum character length for branch names. The default value is 250 chars.

 

Branch name template

Set the Branch name template using the supported variables. Use the template to generate a default name for newly-created branches.

Use the following template variables:

${issuetype} – Issue Type. The Issue type is used to map a custom issue type as part of the template. The mapping pattern should look like this:

${issuetype:type0,subsitute0[,type1,substitute1,...,typeN,substituteN][,defaultsubstitute]}
  • typeN – is the nth issue type string to match.

  • substituteN – is the substitution string to use for typeN.

  • defaultsubstitute – is the substitution string to use if typeN‘s match is not found. If defaultsubstitute is blank, the lowercase version of the defined issue type is used.

${issuekey} – Issue Key. The Issue key is used in upper case.

${summary} – Issue Summary. The Summary is used and will be in lowercase; spaces are substituted by “-“.

The Git Integration for Jira app default is:
${issuekey}-${summary}

This generates the string format like “PRJ-123-add-more-logging” as a default value for the Create Branch and Pull/Merge Request dialogs. Where PRJ-123 is the issue key followed by a hyphen then the summary text of the active issue page (in hyphenated lowercase form).

${projectkey} – Project Key. The Project key is used and will be in uppercase.

${basebranch}INTRODUCED v4.0+ The base branch name is used.

 

Some examples for branch templates

Example 1:
${issuetype}/${issuekey}-${summary}

This generates the string format like “newfeature/PRJ-123-add-more-logging” as a default value for the branch names. Where newfeature is the actual issue type of the active Jira issue; in lowercase and trimmed of whitespaces, PRJ-123 is the issue key followed by a hyphen then the summary text of the active issue page (in hyphenated lowercase form).

Example 2:
${issuetype:New Feature,feature,Bug Fix,bug}/${issuekey}-${summary}

This generates the string format like “feature/PRJ-123-add-more-logging” as a default value for the branch names. This example uses a Jira issue which has the New Feature issue type — where feature is the substituted to issuetype since type0 matches the active Jira issue type; PRJ-123 is the issue key followed by a hyphen then the summary text of the active issue page (in hyphenated lowercase form).

Example 3:
${issuetype:Old Issue,old,Bug Fix,bug,branch}/${issuekey}-${summary}

This generates the string format like “branch/PRJ-123-add-more-logging” as a default value for the branch names. This example uses a Jira issue which has the New Feature issue type — where branch is substituted to issuetype since type0..typeN does not match the active Jira issue type; PRJ-123 is the issue key followed by a hyphen then the summary text of the active issue page (in hyphenated lowercase form).

 

Git pull/merge requests

Enable pull/merge request creation
Shows or hides the function for creating pull/merge requests from the Jira developer panel. This setting is ON by default.

Enable indexing pull/merge requests via API
This setting will index PR/MRs that are associated to Jira issues based on pull/merge request title which includes the Jira issue key. This setting is ON by default.

Enable indexing pull/merge requests by commits
This setting will index PR/MRs that are associated to Jira issues based on commits related to pull/merge requests with commit message containing a Jira issue key. This setting is OFF by default. Users will not be able to toggle this setting to ON/OFF if the Enable indexing pull/requests via API is switched OFF.

When switched to ON, the Enable indexing pull/merge requests via API setting completely activates the feature of indexing of PRs/MRs. This also allows users to use the toggle control for the Enable indexing pull/merge requests by commits setting, which provides an additional way of indexing when switched to ON.

For detailed information on this feature, see article Associate pull/merge requests in Jira Issue.

 

More on General settings

Git roll up issue tab

Git commits issue and project tabs

Git integration features

Branch and pull request settings (formerly Git Integration Options) (this page)

Email settings

Scheduled jobs

Audit log settings

General settings

Repository Browser general setting

Source Code Diff Viewing general setting

Enforce Git service permissions

Enable Automation for Jira general setting

Require User PAT general setting

Have feedback about this article? Did we miss something? Let us know!
On this page