RubyMine 2016.1 Help

Handling Issues

With RubyMine, you can connect your check-in comments with the bug tracker or any issues data base and navigate from committed changes to the issues related to these changes.

To enable this navigation, you need to specify a so called issue navigation pattern, which means:

  1. Figure out an issue ID pattern, that is, a format according to which you will reference issues in commit messages, and define this issue pattern using a regular expression.
  2. Define the link to the referenced issue by combining the URL address of your tracking system and a regular expression to identify the issue ID.
In other words, an issue navigation pattern maps an issue ID pattern in commit messages and URL addresses of referenced issues. As soon as RubyMine encounters a match to the issue ID pattern in a commit message, the match is displayed as a link in the Changes and Version Control tool windows. If you mention several issues, all of them will show up as links. Clicking such link opens the matching issue in the browser according to the defined link.

On this page:

Example

Issue ID pattern The regular expression that defines the format in which issues are referenced in commit messages.

[A-Z]+\-\d+
This regular expressions matches all character strings that consist of two substrings separated by an n-dash character:
  1. Substring 1: An unlimited number of upper case alphabetic characters.
  2. Substring 2: An unlimited number of digital characters.

Issue link pattern A combination of the URL address of your issue tracking system and a regular expression that identifies issues in it.

http://mytracker/issue/$0
Here $0 indicates a back reference to the entire match. This means that as soon as RubyMine detects a match in a commit message, it is added to the URL address of the tracker as is.

Matching issue ID RubyMine detects the following reference to an issue in the commit message of interest:

MYPROJECT-110

Composed issue link In accordance with the above issue navigation pattern, the detected matching reference is added to the URL of the tracker as is, so the link to the referenced issue is composed as follows:

http://mytracker/issue/MYPROJECT-110

To enable navigating from commit messages to issues related to them

  1. Open the Settings dialog box, and click Issue Navigation under the Version Control node.
  2. In the Issue Navigation dialog box that opens, configure a list of issue navigation patterns by setting correspondence between issue patterns in commit messages and URL addresses of referenced issues.
    • If you are using JIRA or our bug tracking system YouTrack, click the Add JIRA pattern add-pattern-jira or Add YouTrack Pattern add-pattern-youtrack respectively, and type the URL to the installation of bug tracking system in question.
      RubyMine adds the regular expression that defines such pattern automatically.
    • For other issue tracking systems, click the Add button add to create a new entry or select an existing entry and click the Edit button. In the Add Issue Navigation Link dialog box that opens, specify the following:
      1. The regular expression that defines the issue pattern in a commit message.
      2. The replacement expression that defines the URL to access the corresponding referenced issue.
    • To remove an issue navigation pattern, select it in the list and click Remove delete.

To navigate from a commit message to the related issues

  1. Open one of the following views:
    • Local Changes, Incoming, or Log tab of the Version Control tool window.
    • History tab of the Version Control tool window.
    • Changes Browser.
  2. Find the commit of interest and click the hyperlink to the related issue.

See Also

Last modified: 21 July 2016