PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

11
Integration with an Issue Tracking System in PhpStorm Introduction to Working with an Issue Tracking System in PhpStorm Enabling Integration with an Issue Tracking System Enabling Integration with a Specialized Issue Tracking System Linking Issues with Source Control Enabling Integration with a Generic Issue Tracking System Working with tasks Introduction to Working with an Issue Tracking System in PhpStorm Let's start with a quick introduction. We can setup issue tracker integration through . Clicking the green butto Project Settings | Tasks | Servers + n to add an issue tracker, we can see PhpStorm comes with many supported issue trackers out-of-the-box. Once an issue tracking server has been added, we can browse our list of issues, correlate VCS commits with issues and tasks, create new tasks and so on. The menu or the keyboard shortcut will list available tasks and provides the Tools | Tasks & Contexts | Open Task... Alt+Shift+N starting point to creating a new task. Tweet Working on a project often means working with issue tracking. There are various issue tracking systems out there: , , YouTrack JIRA FogBugz and more. Many projects use the issue tracker which comes with . PhpStorm comes with built-in support for many of these issue GitHub trackers. It even provides "generic" issue tracker integration which provides integration with other issue trackers . In this tutorial, like Drupal's we'll explore how we can work with issue tracking systems in PhpStorm.

description

Integration with an Issue Tracking System in PhpStorm

Transcript of PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

Page 1: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

Integration with an Issue Tracking System in PhpStorm 

Introduction to Working with an Issue Tracking System in PhpStormEnabling Integration with an Issue Tracking System

Enabling Integration with a Specialized Issue Tracking SystemLinking Issues with Source ControlEnabling Integration with a Generic Issue Tracking System

Working with tasks

Introduction to Working with an Issue Tracking System in PhpStormLet's start with a quick introduction. We can setup issue tracker integration through . Clicking the green buttoProject Settings | Tasks | Servers +n to add an issue tracker, we can see PhpStorm comes with many supported issue trackers out-of-the-box.

Once an issue tracking server has been added, we can browse our list of issues, correlate VCS commits with issues and tasks, create new tasksand so on. The menu or the keyboard shortcut will list available tasks and provides theTools | Tasks & Contexts | Open Task... Alt+Shift+Nstarting point to creating a new task.

Tweet

Working on a project often means working with issue tracking. There are various issue tracking systems out there: , , YouTrack JIRA FogBugzand more. Many projects use the issue tracker which comes with . PhpStorm comes with built-in support for many of these issueGitHubtrackers. It even provides "generic" issue tracker integration which provides integration with other issue trackers . In this tutorial,like Drupal'swe'll explore how we can work with issue tracking systems in PhpStorm.

Page 2: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

When we select a task (or press ), we are asked if we want to clear the current working context. If our project is connected to a VCS, theEnterIDE will suggest creating a new branch to work on the task.

We can make our changes and commit them to the VCS. Note that PhpStorm will automatically populate the commit message with the task id anddescription (if enabled in the settings, more on that later).

Page 3: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

Once work on the task is completely finished, we can use the menu ( ). This willTools | Tasks & Contexts | Close Active Task... Alt+Shift+Wclose the current context in the IDE and, when we tick the checkboxes, commit changes and optionally merge the branch that was created.

In the next sections of this tutorial, we'll dive deeper into how we can connect to the various issue trackers and how we can work with tasks.

Page 4: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

Enabling Integration with an Issue Tracking SystemPhpStorm supports many issue tracking systems out of the box. Supported issue tracking systems provide similar configuration options: wetypically have to specify how we want to connect to the issue tracker system as well as how we want our commit messages to be formatted.

Enabling Integration with a Specialized Issue Tracking System

PhpStorm comes with specific support for , , , , , , , ,  and .YouTrack JIRA Lighthouse Pivotal Tracker Redmine GitHub Trac FogBugz Mantis AssemblaFor other issue trackers, check .#Enabling Integration with a Generic Issue Tracking System

Issue tracker integration can be configured through node. After clicking the green button in the tool bar, weProject Settings | Tasks | Servers +can select the type of issue tracker we want to connect to. Depending on the issue tracking system selected, the configuration details that arerequired will be different.

The following example lists settings for connecting to a YouTrack server

The YouTrack provider comes with completion for fields and values in queries.

Page 5: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

The following example lists settings for connecting to a GitHub issue tracker

More information on connecting to YouTrack and the various configuration options can be found .in the YouTrack documentation

Page 6: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

Once we entered the connection details, we can click the button to check connectivity with the issue tracker.Test

Linking Issues with Source Control

In the , we have seen we can link the issue tracker with our version control#Introduction to Working with an Issue Tracking System in PhpStormsystem (VCS): the id and description of the active task will be used as the commit message when committing to source control.

We can configure if the commit message should be automatically populated and what the format should be by clicking the tab inCommit Messagethe issue tracker server configuration:

Support for additional Issue Tracking Systems is available via .plugins

Page 7: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

Check the for more information about the available placeholders.web help

Enabling Integration with a Generic Issue Tracking System

When working with an issue tracking system not specifically supported by PhpStorm, adding a issue tracker. This generic connectorgenericconnects to many other issue tracking systems but requires a bit more configuration.

Let's add the issue tracker using the generic issue tracker support. After opening the , click theDrupal.org Project Settings | Tasks | Serversgreen button or press ( on Mac OS X). As the issue tracking system, select .+ Alt+Insert CMD+N Generic

On the tab, we can add as the server URL. Since this server is public, we can tick the checkbGeneral https://www.drupal.org/ Login Anonymouslyox, too.

Page 8: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

For generic issue trackers, we will have to configure several other options on the tab. For starters, we will have to specify theServer ConfigurationURL to the issue list. For Drupal, we can enter the path to the issue tracker (using as a placeholder for the previously configured{serverUrl}server URL). This could be:

All open issues: {serverUrl}/project/issues/search/?status=Open&priorities=All&categories=AllAll issues assigned to me: {serverUrl}/project/issues/search/?assigned=YOUR DRUPAL.ORG USERNAME&status=Open&priorities=All&categories=All

We also have to specify the data type (in this case, "text" as our data is free-format HTML) and a regular expression to filter out issue numbersand description. Based on the HTML output from the previous URL, we can use this one:

<td class="views-field views-field-title" \s*>\s*<ahref="/node/({id}.+?)">({summary}.+?)</a>

Using the button, we can verify our settings are correct. In our IDE we can make use of the keyboard shortcut to list issues.Test Alt+Shift+N

Page 9: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

Working with tasksFrom our IDE, we can work with tasks from our issue tracking system. There are several operations available:

Opening a taskViewing a taskSwitching between tasksCommitting code related to a task

Using the keyboard shortcut, we can search for a given task. Note that we can also create a new task (but keep in mind the tasksAlt+Shift+Ncreated are persisted in the issue tracking system). Once a task is selected, we can open it. Optionally we can specify if we want to clear thenotcurrent context or start creating a new VCS changelist. We can choose to create a new branch in the version control system as well.

Using the , we can look at the task's description The keyboard shortcutTools | Tasks & Contexts | Show <task ID> Description Alt+Shift+Bwill open the task in a browser window.

Page 10: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

When multiple tasks have been opened, we can switch between tasks using the keyboard shortcut or the toolbar.Alt+Shift+T

Page 11: PhpStorm IntegrationwithanIssueTrackingSysteminPhpStorm 200116 0045 2516

Once a task has been completed, we can commit source code to our VCS. If we have opened a task from the issue tracker, PhpStorm willpopulate the commit message based on the template specified in settings.

Each task can be opened in a separate task context. This allows us to work with and switch between several tasks at a time withoutmixing the changes that were made between both tasks. Read more on and in our web help.task contexts changelists

Tweet