Toilet Paper 4

IntelliJ and JIRA Workflow

Problem

When processing JIRA tickets, you must do the same tasks over and over again and often have to switch between different programs (browser, IDE, CLI) for this. For example:

1. Set ticket status to „in progress“ (browser)
2. Coding (IDE)
3. Insert commit message incl. ticket commit reference in the commit message (CLI)
4. Change the ticket status (browser)

It impedes the workflow – so why not choose a smarter way?

Solution

Use Changelists! You complete/automate as many steps as possible directly in IntelliJ. JIRA must only be published in IntelliJ as a task server („Preferences -> Tools -> Tasks -> Servers“). Then changelists can be created directly from tickets („Tools -> Tasks & Contexts“).

The following steps, amongst others, can be completed with the help of the task server and the changelists:

  • Changing the ticket status
  • Assigning the ticket to yourself when opening a task
  • Creating a changelist and branch to match the ticket
  • Pre-allocating a commit message by means of a template (automatic referencing in JIRA)
  • Calling up a ticket from IntelliJ directly in the browser when the path is stored under “Preferences -> Version Control -> Issue Navigation”
  • Automatic branch changeover when the changelist is changed

The plugin „Atlassian Connector for IntelliJ IDE“ provides further possibilities:

  • Commenting tickets
  • Creating tickets / sub tasks
  • Reading and adding attachments, comments, etc.
IntelliJ Task Server
IntelliJ Open Tasks

Example

If you now want to process a ticket, you simply call it up in IntelliJ and create a new changelist. In the dialogue window above, you can e.g. set the status of the ticket and create a new branch straightaway.

Thus, the changelist already includes the reference to the ticket which is adopted in the commit message in the event that it is committed via IntelliJ. If the “time tracking” setting is activated, IntelliJ also stops the time for the changelist which is currently active.

If you now open another ticket in this way, the status of the previous ticket can be updated.

---

Further aspects

---

Author

Mathias Bauer, Software Architect, Media & More