Integrating PhpStorm and the Drupal.org Issue Queue

PhpStorm 6.0 came out yesterday, and it’s very very nice. One of the cool new features is that it can connect to what it calls a “Generic” task server. This is for services that Jetbrains has not built service-specific integration for yet. Drupal.org definitely falls into this category. So without further adieu, I present the holy grail of IDE integration:

[image removed – task list – see update at the bottom]

Now, this isn’t perfect. It will have to be configured on a per-project basis, and it’s essentially just string-parsing the output of the issue queue search on Drupal.org. This is what I get for not wanting to write a Java extension!

Configuration instructions:

  1. Open a project in PhpStorm
  2. Open the PhpStorm settings and navigate to Tasks -> Servers.
  3. Add a new Generic task server
  4. Make each of the configuration tabs look as follows:

[image removed – general settings – see update at the bottom]

[image removed – commit message settings – see update at the bottom]

[image removed – additional settings – see update at the bottom]

For copy pasting, here’s the task list URL (note that you should copy/paste the {serverUrl} part – it is included in that textbox):

{serverUrl}/project/issues/search/[PROJECT SHORTNAME]?assigned=[YOUR DRUPAL.ORG USERNAME]&status%5B%5D=1&status%5B%5D=13&status%5B%5D=8&status%5B%5D=14

and here’s the regex:

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

Note that you’ll have to add an additional task server for each project that you want to display issues for (for instance, if you wanted to display tasks for Drupal core and for Views, you’d have to have two task servers). The reason for this is that the global issues advanced search (/project/issues/search) is only available to authenticated users on Drupal.org. We don’t have a way to authenticate through PhpStorm, so we’re kind of limited to resources available to anonymous users.

Note that the above configuration will only display issues that are assigned to you. If you want more issues than that, you can set up the issue queue search on Drupal.org how you like it and paste the URL into the task list URL field in PhpStorm.

UPDATE: I’ve removed the images from this post because screencloud deleted them and they’re out of date anyways (since Drupal.org was upgraded to D7).

15 comments on “Integrating PhpStorm and the Drupal.org Issue Queue

  1. Vitaly said on March 14, 2013 at 5:27 am: Reply

    You should repost this on one of the drupal.org’s handbooks!

    • cweagans said on March 14, 2013 at 10:23 am: Reply

      Good call! I’ve added a link to this page: http://drupal.org/node/147789 (It’s right above the “SQL & Database tools” header)

  2. greg.1.anderson said on March 14, 2013 at 11:00 am: Reply

    Cool integration. If PhpStorm allows you to define custom commands, and if those commands have access to the current task title, then you could use the Drush issue queue command (http://drupal.org/project/drush_iq) to add an “apply patch from current issue” button to your IDE. Now wouldn’t that be nifty?

    • cweagans said on March 14, 2013 at 1:19 pm: Reply

      That’s a pretty awesome idea. I’ve been toying with the idea of writing a custom integration module for PhpStorm for a while, and that’d be a great feature to include.

  3. nod_ said on March 14, 2013 at 11:18 am: Reply

    Brilliant.

  4. fndtn357 said on March 14, 2013 at 3:25 pm: Reply

    thank you in a big way.

  5. Chris Weber said on March 14, 2013 at 4:09 pm: Reply

    How do you open the task viewer? that first prompt you have open?

  6. rbayliss said on March 15, 2013 at 6:13 am: Reply

    This is amazing. Thanks!

  7. screencloud.net said on March 19, 2013 at 1:58 am: Reply

    screencloud.net looks down, so i can’t see the images :-(

    • donquixote said on May 9, 2014 at 6:13 pm: Reply

      me too.. no images.

  8. pcambra said on April 3, 2013 at 7:08 am: Reply

    Amazing, you could use:
    {serverUrl}/project/issues/search?assigned=[YOUR DRUPAL.ORG USERNAME]&status[]=1&status[]=13&status[]=8&status[]=14

    For all projects.

    • cweagans said on April 6, 2013 at 12:39 pm: Reply

      Sadly, you can’t. /project/issues/search is locked down to authenticated users only on Drupal.org.

  9. Anonymous Coward said on April 18, 2013 at 8:49 am: Reply

    “This is what I get for not wanting to write a Java extension!” – lazy you))
    Do you need help in writing a Java extension?
    _________________
    William – CARiD

    • cweagans said on April 18, 2013 at 10:15 pm: Reply

      Haha. Not so much laziness…I just don’t like writing Java. I despise that language. As such, I probably would not be interested in writing the Java extension myself, but I’d be happy to provide direction or testing if you want to write it and open source it :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>