Allura (SourceForge) Mylyn Connector

Having recently upgraded OfficeFloor (http://sourceforge.net/projects/officefloor) to use Allura the Mylyn Web Template Connector configuration needs changing.  While there is a discussion item for an Allura Mylyn Connector, the work around is to use the Web Template Connector.

The new configuration for Allura is:

  • Task URL: ${serverUrl}/p/${project}/${tickets}/
  • New Task URL: ${serverUrl}/p/${project}/${tickets}/new
  • Query Request URL: ${serverUrl}/p/${project}/${tickets}
  • Query Pattern: <td><a href=”/p/${project}/${tickets}/\d+/”>({Id}\d+)</a></td>\s*<td><a href=”/p/${project}/${tickets}/\d+/”>({Description}[^<]*)</a></td>\s*<td[^<]+</td>\s*<td[^<]+</td>\s*<td>({Owner}[^<]*)</td>
  • Login still works similar to the old Using SourceForge With Mylyn

The Query Pattern works for the standard SourceForge Allura columns: #, Summary, Milestone, Status, Owner

Should the columns be customized, the Query Pattern is constructed by concatenating the following together in the order of the columns:

  • ID: \s*<td><a href=”/p/${project}/${tickets}/\d+/”>({Id}\d+)</a></td>
  • Description: \s*<td><a href=”/p/${project}/${tickets}/\d+/”>({Description}[^<]*)</a></td>
  • Owner: \s*<td>({Owner}[^<]*)</td>
  • skipping columns to keep pattern match: \s*<td[^<]+</td>

Admittedly while this does not provide the full Mylyn Connector functionality, it at least allows listing the tasks within Mylyn and associating commits against them (which is most important to me).  Managing the tickets will however have to be done through a browser.

In summary steps are:

  1. Install the Mylyn Web Template Connector (not part of standard install but is in the Mylyn incubator update site)
  2. Add a Task Repository with the above configurations (though change the project parameter to your project).  See screen shot below for an example.
  3. Within the Task List add a new Query for each ticket repository (changing the tickets parameter to the particular ticket repository – e.g.  support-requests)

AlluraMylynConfiguration

OfficeFloor-features

Advertisements

15 Responses to Allura (SourceForge) Mylyn Connector

  1. Andy says:

    Hi !
    Does this configuration still work for you? I tried to set it so, but I got zero entries returned. It seems that things have changed a little…. again.
    Andy

    • sagenschneider says:

      Hi Andy

      Yes, still working for me 🙂

      A big gotcha in getting it working is that it uses regular expresssions and the column order needs to match (not skipping any).

      Dan

  2. Andy says:

    Project is ggc, lists that I need are bugs (this one is standard), and devtasks (this one is little modified, has more columns).
    Thanks for help,
    Andy

    • sagenschneider says:

      Hi Andy

      I was able to get both ggc bugs and devtasks listed with the above configuration, changing only:

      project: ggc
      tickets: bugs

      Changing tickets to devtasks got the other.

      Note: I have also added a screen shot above of creating the query (step 3). Pressing the ‘preview’ button gets the tickets to appear after a few seconds.

      Dan

  3. haaihenkie says:

    Hi all,

    At first I had a problem getting this to work but then discovered the copied query pattern contained fancy quotes (”). After I replaced them with straight quotes (“) it was working.

    I also discovered that you can filter your SourceForge tickets and would like to share that with you.

    In the Features dialogue box:
    – Add a parameter “query”.
    – Change Query Request URL to: ${serverUrl}/p/${project}/${tickets}/search/?q=${query}

    Now you can give the parameter query any value you would give to a search bin in SourcForge’s ticket system, e.g. “_milestone:1.0 && status:open”.

    Cheers,

    Henk

    • haaihenkie says:

      After posting this I can see that this site changes any quotes to smart quotes. Something to be aware of.

  4. haaihenkie says:

    Hello all,

    This page is a valuable resource for people who want to use the Mylyn Web Template Connector to SourcForge/Allura. That is why I like to share 2 solutions here for recent changes in SourceForge that might cause the connector to stop working.

    The first change is the column Owner in the ticket overview. The name of the Owner is now a link to a search for all tickets owned by that person. Because of this the query pattern for Owner has to be changed to the following value:

    \s*\s*]*>({Owner}[^<]*)

    The query pattern does not work if you do not specify an owner. So you should add an Owner to all tickets that you want to synchronise with Mylyn in Eclipse.

    The other change is that SourceForge switched to strong encryption, while java is distributed without strong encryption. This causes the error “Received fatal alert: handshake_failure” and you are not able to synchronise your tickets with SourceForge anymore. You can find the solution in the accepted answer in this thread: http://stackoverflow.com/questions/38203971/javax-net-ssl-sslhandshakeexception-received-fatal-alert-handshake-failure/38264878#38264878. If you do not know from which directory Eclipse is using java, you can check by clicking Help > About Eclipse > Instalation details > Configuration and looking up the location under -vm.

    Cheers,

    Henk

  5. haaihenkie says:

    ~~~~
    \s*\s*]*>({Owner}[^<]*)
    ~~~~

  6. haaihenkie says:

    \s*<td>\s*<a href=”/p/${project}/${tickets}/[^>]*>({Owner}[^<]*)</a>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: