Before you start configuring a connection to your tracker, note that IntelliJ IDEA:
  • Supports only services with REST API.
  • Supports either Basic HTTP authentication or sending preliminary requests to the server.
  • Supports GET and POST requests.
  • Does not support pagination in server responses.

IntelliJ IDEA supports integration with many task trackers out of the box. However, if you use a tracker that IntelliJ IDEA does not support yet, you can still integrate it configuring a so called generic server.

This tutorial describes how to:

  • Connect to JIRA Cloud as a generic server
  • Obtain the list of issues assigned to you
  • For each issue, get its ID, title, description, date and time when the issue was created and updated

1. Specify server URL and credentials

If you work on MacOS, navigate to IntelliJ IDEA | Preferences | Tools | Tasks | Servers.

  1. Navigate to File | Settings | Tools | Tasks | Servers.
  2. Click images/new.png and select Generic.
  3. On the General tab, specify the URL of your task tracker, connection credentials and select the Use HTTP authentication checkbox. images/tutorial_generic_general_tab.png

2. Configure server settings

You can use code completion in the Login URL, Tasks List URL and Single Task URL fields.

  1. Switch to the Server Configuration tab.

    The {serverUrl} is a variable that stands for the URL you have specified on the General tab.

  2. In the Tasks List URL, enter the URL for obtaining issues from the server. You can use variables or enter the full URL:
    {serverUrl}/rest/api/2/search or https://serverurl.atlassian.net/rest/api/2/search
  3. Add the ?jql={JQL_Query} expression to your task list URL: {serverUrl}/rest/api/2/search?jql={JQL_Query}. images/tutorial_generic_task_list_url.png 
  4. Click Manage Template Variables at the bottom of the window to configure the JQL_Query variable.
  5. Click images/new.png in the top right-hand corner.
  6. In the new filed, specify variable name (JQL_Query), and add its value (assignee = currentUser() and resolution = Unresolved).
    This will let you obtain unresolved issues assigned to you.
  7. Click OK. images/tutorial_generic_template_variables.png 

Note that the Login URL field will be disabled, as you are using HTTP authentication.

3. Configure response type and specify selectors

Selectors help you retrieve specific information about tasks. First three selectors are mandatory:
tasks: path to tasks in the server response (root element).
id: relative path to a task ID in the server response.
summary: relative path to a task title in the server response.

  1. In the Server Configuration window, select the JSON response type.
  2. Specify selectors in the table to get IDs and titles of issues, and to obtain their description. You can also learn date and time when issues were created and updated:
    • tasks: $.issues 
    • id: key
    • summary: field.summary
    • description: field.description
    • updated: field.updated
    • created: field.created
  3. Click Test to make sure all parameters are configured correctly. images/tutorial_generic_configuration_selectors.png

For JIRA, you can check the server responses in real time. Replace placeholders with actual values and open the link in a browser:
http://<server URL>:<port>/rest/api/2/search

4. Upload issues from server

  1. Click the tasks combo and select Open Task. IntelliJ IDEA will load from the server all issues that match your configuration. images/tutorial_generic_open_task_combo.png
  2. Select the necessary issue from the list.
  3. Press Ctrl+Q to open issue description and make sure all required details are obtained. images/tutorial_generic_open_task.png

See Also

External Links: