Jira Developer Panel

Git links are now available on the developer panel in the following screens:

  • Issue page
  • Search page in detailed view
  • Jira Agile screen
Jira Git Source Code panel

The 153 commits refers to an existing Git Commits view, which the issue tab have now.  Clicking this text link will reload the page and automatically selects the Git Commits tab to view the commits.

The Roll Up refers to an existing Git Roll Up view, which the issue tab have now.  Clicking this link will reload the page and automatically selects the Git Roll Up tab to view the git code summary.

Jira Server Only Click compare branchesCompare code to compare code diff of different branches.  It will open the following dialog:

Jira Git Source Code panel - compare code

Select a Repository.  Set Compare branch and Base branch then click Compare to proceed.  The view redirects to the Repository browser Compare page showing changes between the compared branches.

fyi
The most commonly used name for the main branch is master.  In this documentation, the master branch is also the main branch.

Branches

The Branches section lists the branches names, linking the selected branch to view via the Repository Browser.

The branch is displayed on the developer panel and is also associated to the mentioned Jira issue by fulfilling one of the following conditions:

  • The branch name contains the issue key.  For example, TEST-1-fix-binaries.
  • The branch has associated unmerged commits with the issue key in the comments.  For example, TEST-1 fixed binaries.
note
For example, TST-1-new-branch branch will be visible on the developer panel of the TST-1 issue page even if the TST-1-new-branch branch has just been forked from master and does not have any new commit.
warning
For connected GitHub git host, this feature requires enabled public_repo scope permissions.

Click Create Branch to create a branch for the selected repository.  The following dialog is displayed:

Jira Git Source Code panel - create branch
  • Select a Repository.
  • GitHubIf there are several repositories with the same name, the listed GitHub repositories will have their names attached with a GitHub organization name.  For example, BigBrassBand/second-webhook-test-repo.
    GitLabIf there are several repositories with the same name, the listed GitLab repositories will have their names attached with a GitLab owner name.  For example, johnsmith/second-webhook-test-repo.
  • Set Base branch and Branch name
  • The Git add-on will populate the Branch name field according to the Branch Name Template declared in the Git Integration Options icons via General Settings.  Enter a descriptive name or leave it as is (recommended).

If the Require User PAT option icons  is enabled in the Integration Settings and a user PAT isn't configured yet for the selected repository via Repository Browser, the following dialog is displayed instead:

jira server issue create branch dlg PAT required
  • Click the link label to setup the PAT.  This will show the Repository Browser listing connected git repositories.
  • jira server repository browser enter user PAT
  • Click the  icons  icon to setup a PAT for the selected repository.  Paste a valid PAT of the current user to proceed.  Invalid PATs will fail the branch creation process.
  • Click  icons  to use this PAT and save it to the current user profile. Click  icons   to cancel setting up PAT for this repository.
  • After the above steps have been taken, the users will be able to proceed with branch creation.

Click Create branch to proceed.  The newly created branch is listed under the Branches section based on branch name.  The index operation starts immediately after the branch is created.

Dev panel create branch delete icon on hover

Hover the mouse pointer on the branch label to reveal the Delete icon.  Click this icon to remove the created branch from the Branch list. This action will also delete it from the repository in which it was created.

fyi
This feature is available on connected GitLab* and GitHub** git hosts for Jira Server; GitLab, GitHub, Microsoft TFS/VSTS and AWS CodeCommit git hosts for Jira Cloud.
Git Integration for Jira Server/Cloud:
* v2.12.3
** v2.13.0

Commits Ahead and Behind

The numbers ahead and behind represent the number of commits that are ahead/behind the main branch:

  • Ahead  –  number of commits in the branch which are not merged to the main branch.
  • Behind  –  number of commits in the main branch which are not merged to the branch.

Clicking on the branch text links will open that issue in the Repository Browser.  If Repository Browser is disabled for this repository, the text links will be inactive.

note
The Branches section is only visible if commits from this branch are not merged to the main branch.  It's also not displayed if the repository is not associated with a project.
warning
If the user does not have the View Development Tools project permission for the project, the developer panel will be unavailable for that user.

Pull Request/Merge Request

Jira Git Source Code panel - create pull/merge requests

The Merge requests (if GitLab is connected) or Pull Requests (GitHub or other connected git hosts) section lists the merge/pull requests and their status.  All merge/pull requests from all types of sources are shown here (for now, GitLab/GitHub/TFS/VSTS).

The displayed information depends on which supported git hosts are connected to Jira.  For example:

  • GitLab integrations only  –  merge requests
  • GitHub integrations only  –  pull requests
  • Both GitLab and GitHub integrations  –  separate sections for merge requests and pull requests

For necessary permissions that GitLab users must have for creating branches/merge requests, see GitLab Documentation: Permissions

warning
This function does not work for connected single git repositories.  Use the GitLab or GitHub auto-connect integration instead.

For example, if GitHub is connected to Jira, create a pull request by clicking Create merge request.  The following dialog is displayed:

Jira Git Source Code panel - compare code
  • Select Repository from the list.
  • GitHubIf there are several repositories with the same name, the listed GitHub repositories will have their names attached with a GitHub organization name.  For example, BigBrassBand/second-webhook-test-repo.
    GitLabIf there are several repositories with the same name, the listed GitLab repositories will have their names attached with a GitLab owner name.  For example, johnsmith/second-webhook-test-repo.
  • Choose the newly-created branch as the Source branch.
  • Set master as the Target branch.
  • Enter a descriptive title or leave it as is (recommended).

If the Require User PAT option icons is enabled in Integration Settings and a user PAT isn't configured yet for the selected repository via Repository Browser, the dialog below is displayed instead:

jira server issue page create pat dialog requiring to setup pat
If an invalid PAT was configured for the selected repository, the pull request creation process will fail.
  • Click Create to create the pull request.
  • fyi
    This feature is available on connected GitLab* and GitHub** git hosts for Jira Server; GitLab, GitHub, Microsoft TFS/VSTS and AWS CodeCommit git hosts for Jira Cloud.
    Git Integration for Jira Server/Cloud:
    * v2.12.3
    ** v2.13.0

    If you want to create a pull request for GitHub, click Create pull request.

    The merge/pull request is displayed on the developer panel and will also be associated to the mentioned Jira issue by fulfilling one of the following conditions:

    • Merge/pull request Title contains the issue key.  For example, TEST-1: Fix-binaries.
    • Base Branch or Branch Name is assigned an actual name of an issue key.  For example, TEST-1.

    This will also allow a service user to associate a Merge/Pull Request with multiple Jira issues regardless of commit associations.

    warning
    BigBrassBand recommends service users to enable pull/merge requests webhook trigger events.  This way, any changes to merge/pull requests gets reindexed quickly.

    The Merge/Pull Request list provides status information about the merge/pull request if it is opened or merged. For example:

    Dev panel merge/pull request status info

    Hover the mouse pointer on the merge/request label to see information of the repository and branch it belongs to:

    Dev panel merge/pull request hover info

    In Issue and Search pages, the developer panel is visible on the right pane:

    Dev panel search and issue pages

    Agile Screen

    In Jira Agile screen, click on an issue on the board grid.  Scroll down on the right pane to view the developer panel:

    Jira developer panel Agile screen