Difference between revisions of "Using Sourceforge with Mylyn"

From Eclipsepedia

Jump to: navigation, search
(Repository)
m (Queries)
(6 intermediate revisions by 3 users not shown)
Line 8: Line 8:
 
* Eclipse 3.3 [[Europa]] (choose one of the downloads from the main page),
 
* Eclipse 3.3 [[Europa]] (choose one of the downloads from the main page),
 
* Latest [[Mylyn]] version. See [http://www.eclipse.org/mylyn/downloads/ project download page]
 
* Latest [[Mylyn]] version. See [http://www.eclipse.org/mylyn/downloads/ project download page]
* The [[Mylyn User Guide#Generic Web Repository Connector|Generic Web Repository Connector]] from the "extras" update site
+
* The [[Mylyn User Guide#Generic Web Templates Connector|Generic Web Templates Connector]] from the "extras" update site. This was formerly known as the Generic Web Repository Connector.
 +
* with Eclipse 3.4 or newer you need to add this [http://download.eclipse.org/tools/mylyn/update/incubator/ updatesite] to eclipse, to get the connector.
 +
* The latest version of mylyn. Older versions are not guaranteed to work with the latest Generic Web Templates Connector.
  
 
== Repository ==
 
== Repository ==
Line 31: Line 33:
  
 
Now that the repository is known in Mylyn you can create queries to show bugs, feature requests and other tracker items inside Eclipse. First take a web browser and open the tracker page of the Sourceforge tracker you want extract items from (e.g. the bug tracker of your project). After loading the page in your browser the URL contains pieces like "group_id=12345" and "atid=67890". You need those numbers in the next steps.
 
Now that the repository is known in Mylyn you can create queries to show bugs, feature requests and other tracker items inside Eclipse. First take a web browser and open the tracker page of the Sourceforge tracker you want extract items from (e.g. the bug tracker of your project). After loading the page in your browser the URL contains pieces like "group_id=12345" and "atid=67890". You need those numbers in the next steps.
 +
 +
Note: Starting late 2012, SourceForge changed the user interface and the tracker URLs no longer include group_id= and atid=, instead they use the project name and tracker mount point. ([[User:Ilg.livius.net|Liviu Ionescu]] 11:41, 3 January 2013 (UTC)).
  
 
Use the right mouse button menu on the task repository created in the first step and select "New query". Select the "Sourceforge" repository. In the following dialog use these configuration items:
 
Use the right mouse button menu on the task repository created in the first step and select "New query". Select the "Sourceforge" repository. In the following dialog use these configuration items:
Line 37: Line 41:
 
* group_id: ''the numbers following the group_id parameter in the URL you just opened in the browser''
 
* group_id: ''the numbers following the group_id parameter in the URL you just opened in the browser''
 
* atid: ''the numbers following the atid parameter in the URL you just opened in the browser''
 
* atid: ''the numbers following the atid parameter in the URL you just opened in the browser''
* Query URL: ${serverUrl}/tracker/?group_id=${group_id}&atid=${atid}&set=custom&_status=1
+
* Query URL: ${serverUrl}/tracker2/?group_id=${group_id}&atid=${atid}&set=custom&_status=1
* Query Pattern (already preconfigured in the repository template for SourceForge): <nowiki>&lt;a href="/tracker/index.php\?func=detail&amp;amp;aid=(.+?)&amp;amp;group_id=${group_id}&amp;amp;atid=${atid}">(.+?)</a></nowiki>
+
* Query Pattern (already preconfigured in the repository template for SourceForge): <nowiki>&lt;a href="/tracker2/\?func=detail&aid=(.+?)&group_id=${group_id}&atid=${atid}">(.+?)&lt;/a></nowiki>
  
 
This creates a list of open items in this tracker.
 
This creates a list of open items in this tracker.
  
If you want a list of open items which are assigned to you, use this query URL instead:
+
If you want a list of open items which are assigned to you, use one of the following query URLs instead. The first seems less error prone:
* Query URL: ${serverUrl}/tracker/?group_id=${group_id}&atid=${atid}&set=custom&_assigned_to=''SourceforgeUserID''&_status=1
+
* Query URL: '''${serverUrl}/tracker2/?func=rssfeed&group_id=${group_id}&atid=${atid}'''
 +
* Query URL: '''${serverUrl}/tracker/?group_id=${group_id}&atid=${atid}&set=custom&_assigned_to=''SourceforgeUserID''&_status=1'''
  
 
You can create additional queries which have the same abilities to filter and extract items from the tracker as you can do with the tracker web page itself. You only need to add more parameters to the query URL. You can find the available parameters by inspecting the source code of the tracker web page.
 
You can create additional queries which have the same abilities to filter and extract items from the tracker as you can do with the tracker web page itself. You only need to add more parameters to the query URL. You can find the available parameters by inspecting the source code of the tracker web page.
  
 
:[[Image:tracker.gif]]
 
:[[Image:tracker.gif]]

Revision as of 07:41, 3 January 2013


The Generic Web Repository Connector of Mylyn can be used to integrate Sourceforge trackers as task repositories inside Eclipse. This page describes the necessary configuration to be able to connect to multiple Sourceforge projects and to browse all their tracker items (including project member only trackers). Required settings are also available from the pre-packaged templates that can be selected in the web connector repository configuration.

Preconditions

You need:

  • Eclipse 3.3 Europa (choose one of the downloads from the main page),
  • Latest Mylyn version. See project download page
  • The Generic Web Templates Connector from the "extras" update site. This was formerly known as the Generic Web Repository Connector.
  • with Eclipse 3.4 or newer you need to add this updatesite to eclipse, to get the connector.
  • The latest version of mylyn. Older versions are not guaranteed to work with the latest Generic Web Templates Connector.

Repository

Create a new task repository (inside the view "task repositories"), choose "Generic web-based access" and use these configuration items:

  • Server: http://sourceforge.net/
  • Label: Sourceforge
  • Anonymous Access: (off)
  • User ID: your Sourceforge username
  • Password: your Sourceforge password
  • serverUrl: https://sourceforge.net

Open Additional Settings and then Advanced Configuration sections:

  • Login Request URL: ${serverUrl}/account/login.php?form_loginname=${userId}&form_pw=${password}&login=Login
  • Button after "Login Request URL": switch to "POST"

Note: If you want to integrate Mylyn with multiple Sourceforge projects, you do not need multiple repositories. Instead you can create multiple queries in the task list with corresponding configuration parameters.

Queries

Now that the repository is known in Mylyn you can create queries to show bugs, feature requests and other tracker items inside Eclipse. First take a web browser and open the tracker page of the Sourceforge tracker you want extract items from (e.g. the bug tracker of your project). After loading the page in your browser the URL contains pieces like "group_id=12345" and "atid=67890". You need those numbers in the next steps.

Note: Starting late 2012, SourceForge changed the user interface and the tracker URLs no longer include group_id= and atid=, instead they use the project name and tracker mount point. (Liviu Ionescu 11:41, 3 January 2013 (UTC)).

Use the right mouse button menu on the task repository created in the first step and select "New query". Select the "Sourceforge" repository. In the following dialog use these configuration items:

  • Label: Label of the tracker you opened with the browser, e.g. "Bugs"
  • group_id: the numbers following the group_id parameter in the URL you just opened in the browser
  • atid: the numbers following the atid parameter in the URL you just opened in the browser
  • Query URL: ${serverUrl}/tracker2/?group_id=${group_id}&atid=${atid}&set=custom&_status=1
  • Query Pattern (already preconfigured in the repository template for SourceForge): <a href="/tracker2/\?func=detail&aid=(.+?)&group_id=${group_id}&atid=${atid}">(.+?)</a>

This creates a list of open items in this tracker.

If you want a list of open items which are assigned to you, use one of the following query URLs instead. The first seems less error prone:

  • Query URL: ${serverUrl}/tracker2/?func=rssfeed&group_id=${group_id}&atid=${atid}
  • Query URL: ${serverUrl}/tracker/?group_id=${group_id}&atid=${atid}&set=custom&_assigned_to=SourceforgeUserID&_status=1

You can create additional queries which have the same abilities to filter and extract items from the tracker as you can do with the tracker web page itself. You only need to add more parameters to the query URL. You can find the available parameters by inspecting the source code of the tracker web page.

Tracker.gif