RubyMine 2017.2 Help

Managing tasks and contexts

When you work on a project, you can organize your work in smaller tasks that you need to complete.

These can be tasks that you set yourself. In RubyMine, you can divide a large task into smaller tasks associated with dedicated changelists.

Or these can be tasks coming from your issue tracker. For example, you can work with tasks and bugs assigned to you directly from RubyMine. To be able to do so, configure a connection between the IDE and your tracker account first.

Configuring integration with issue trackers

To enable integration with an issue tracker:

  1. Access the Servers box. To do so, navigate to File | Settings | Tools | Tasks | Servers (if you work on MacOS, use the use the RubyMine | Preferences menu options) or press Ctrl+Alt+S.
  2. Click /help/img/idea/2017.2/add.png, or press Alt+Insert, and select the necessary issue tracker form the list.
  3. In the Servers window, enter connection details. Note that settings may differ depending on your issue tracker.
    • General tab: normally, you will have to specify the server URL and connection credentials.
      Select the Share URL option to allow access to the server for other members of your team.
      Click Proxy settings if you want to access the server via a proxy server. You can find more information on proxy settings in the HTTP Proxy section.
    • Commit Message tab: (optional) enable adding a commit message for a changelist and configure a message template.
    • Server Configuration tab: for some trackers (for example, for trackers not supported out of the box), you will have to configure server parameters as well.
      Specify the URLs and the request type for accessing tasks, select a format for a tracker server response – XML for XPath, JSON for JSONPath, or text for regular expressions. You can also use the table of selectors to specify details about tasks you want to get from the server. For example, this can be a date when a task was created or its URL.
      Note that you can use code completion in this window. For more information on how to configure connection to a custom (or generic) tracker, refer to Configuring Generic Task Server.

    The screenshot below shows a configuration example for YouTrack.

  4. (Optionally) Optimize synchronization between RubyMine and your issue tracker.
    RubyMine caches the list of issues loaded from the tracker and updates them repeatedly. You can specify how many issues should be cached and how often RubyMine should update information about them. To do so, return to the Tasks window. In the Cache settings section, enter the necessary values.

Working with tasks

In RubyMine, there two types of tasks:

  • Tasks that were loaded to RubyMine from your issue tracker. These are tracker tasks.
    Tracker tasks are linked with the corresponding issues in your issue tracker. This allows you to monitor and update them directly from RubyMine.
  • Tasks that were originally created in RubyMine. These are local tasks.
    As you work on a project, it may be essential for you to organize the entire scope of your work in smaller tasks. You will be able to focus on more important pieces of work and postpone less important. Local tasks are not related to an issue tracker.

If you have created at least one task of either type, a drop-down list called tasks combo becomes available on the toolbar. Use the tasks combo to navigate your tasks, switch between them, or remove them.


Opening tracker tasks

Tracker tasks are loaded to your RubyMine once you connect it to your issue tracker. To open a tracker task:

  1. Open the list of tasks. To do so, navigate to Tools | Tasks&Contexts | Open Task, click the tasks combo on the toolbar, or press N/A.
  2. Select the necessary task from the list.
  3. In the Open Task dialog, you can update issue state, choose whether to clear the current context, and specify VCS options.

Tracker tasks have the light-colored background until they are opened in RubyMine. After that, their background color changes to white.

Creating local tasks

In RubyMine, you can create local tasks that do not originate from your issue tracker. To create local tasks:

  1. Launch the Open Task dialog by navigating to Tools | Tasks&Contexts | Open Task. You can also use the tasks combo or just press N/A.
  2. In the Enter task name pop-up window, type a task name and click Create New Task.
  3. In the next dialog, you can specify whether to clear the current context and configure VCS options.

Viewing task description

When you are choosing a task to switch to, the list of tasks shows only task IDs. This information is not always sufficient, because it reflects neither the steps that lead to the problem nor the related discussion. To open a task description:

  1. Launch the Open Task dialog.
  2. Select the necessary task and press CRTL+Q.
  3. To open the description in a browser, click /help/img/idea/2017.2/tasks_task_description_inbrowser.png or press Shift+F1 (for tracker tasks only).

Alternatively, navigate to Tools | Tasks&Contexts and click Show 'task ID' Description or Open 'task ID' in Browser.

Viewing closed tasks

A closed local task is a task that is not associated with a changelist if the entire project or the affected directory is under a version control.
A closed tracker task is a task that has the closed status in your the issue tracker.

To display closed tasks:

  1. Click the tasks combo and then click Open Task.
  2. Select the Include closed tasks check box, or press N/A.

Closing and deleting tasks

To close a task, navigate to Tools | Tasks&Contexts and click Close Active Task.

This will close the current context in the RubyMine. Select the necessary check boxes to commit changes and, optionally, merge the branch that was created. For tracker tasks, you can also change their state. The new state will be propagated to your issue tracker.


If you do not need a task to appear in RubyMine, you can remove it from the list of tasks. To delete a task:

  1. Click the tasks combo on the main toolbar.
  2. Select one or more tasks you want to delete.
    Use Shift (for adjacent items) or Ctrl (for non-adjacent items) keys for multiple selection.
  3. Click the right-arrow button, and select Remove.

When you are deleting tracker tasks, you remove them from the IDE. They will remain in your issue tracker. Local tasks in this case will be completely removed, since they are not connected to your issue tracker.

Time tracking

With RubyMine, you can track the amount of time you spend on a task working within the editor.
For local tasks, this information might be helpful if you want to know how much time exactly you need to compete a task as you work on a project.
For tracker tasks, this option is useful if your issue tracker configuration requires that you log the time you spend on tasks. In this case, you can send your time log from RubyMine to the tracker.

To enable the time tracking option:

  1. Navigate to Settings/Preferences | Tools | Tasks | Time Tracking and select the Enable Time Tracking check box.
  2. (Optionally) Change the Suspend delay value. Here you can specify how much time you have to stay inactive before the task will be considered suspended.

In the Time Tracking tool window, use the Auto mode /help/img/idea/2017.2/time_tracking_auto_mode.png for automatic time logging, or the Start timer for the active task /help/img/idea/2017.2/time_tracking_timer_on.png and Stop timer for the active task /help/img/idea/2017.2/time_tracking_timer_off.png options for manual time recording.

Sending time log to tracker

To send the recorded time log to your issue tracker:

  1. Click Post work item to bug tracker /help/img/idea/2017.2/time_tracking_post.png in the Time Tracking tool window.
  2. Specify time interval you want to log. Optionally add a comment.
  3. Click OK to push the log to the tracker.

Working with contexts

Saving context

A context is a set of files that are connected with a task. With RubyMine, you can save and clear contexts without associating them with specific tasks.

To save the current context:

  1. From the main menu, select Tools | Tasks&Contexts | Save Context on the main menu, or press Shift+Alt+S.
  2. (Optionally) In the Save Context dialog, specify a comment, if necessary.

Switching between contexts

With RubyMine, you can switch between contexts that are not associated with specific tasks. This will let you work with tasks and switch between them without mixing the changes that were made between both tasks.

To switch to another context:

  1. From the main menu, select Tools | Tasks&Contexts | Load Context, or press Shift+Alt+L.
  2. In the Load Context pop-up window, select the necessary context from the list.
    Alternatively, click the right arrow and select Load.

Clearing and deleting contexts

To clear the current context without loading another one, choose Tools | Tasks&Contexts| Clear Context on the main menu, or press Shift+Alt+X.

When a task is finished, or if you do not need a context anymore, you can remove it. To delete a context:

  1. From the main menu, select Tools | Tasks&Contexts | Load Context, or press Shift+Alt+L.
  2. In the Load Context pop-up window, click the right arrow and select Remove.
Last modified: 26 October 2017

See Also

Tutorials and Examples: