Project

General

Profile

HowTo Mylyn » History » Version 28

Felix Schäfer, 2010-07-13 16:01

1 27 Felix Schäfer
(I got tired of scrubbing spam from this page, please "contact me":/users/3866 with the needed modifications if you spot errors. I don't use Eclipse or Mylyn myself, so all credit goes to the original authors and those that have sent modifications to me.)
2 26 Felix Schäfer
3 1 Jean-Philippe Lang
h1. HowTo connect a Mylyn repository to Redmine
4
5 13 Mischa The Evil
{{>TOC}}
6 1 Jean-Philippe Lang
7 27 Felix Schäfer
These instructions should work with redmine 0.9 stable and up.
8
9 13 Mischa The Evil
h2. Using the generic web repository connector
10
11 1 Jean-Philippe Lang
"Mylyn":http://www.eclipse.org/mylyn is an Eclipse plugin for task management.
12
This HowTo explains how to connect to Redmine using the generic web repository connector.
13
14 6 Mischa The Evil
Note that the generic web repository connector is not part of the default Mylyn install.
15 1 Jean-Philippe Lang
So, you have to install it first from the _incubator_ update site (see http://download.eclipse.org/tools/mylyn/update/incubator).
16
17 13 Mischa The Evil
h3. Create a Task Repository
18 1 Jean-Philippe Lang
19
# Right-click on the task repositories list and click *Add task repository*
20 5 Jeffrey Price
# Choose _Web Template (Advanced)_ and click *Next*
21 1 Jean-Philippe Lang
# Configure the repository:
22 2 Jean-Philippe Lang
23 1 Jean-Philippe Lang
<pre>
24
Server:                 http://www.redmine.org -- Replace it with the URL of your Redmine instance
25 27 Felix Schäfer
Task URL:               ${serverUrl}/issues/
26 1 Jean-Philippe Lang
New task URL:           ${serverUrl}/projects/foo/issues/new -- Replace foo with the identifier of the project used for new tasks
27
Query request URL:      ${serverUrl}/issues
28 27 Felix Schäfer
Query pattern:          <td class="subject">.*?<a href="/issues/(\d+)">(.+?)</a></td>
29
Login request URL:      ${serverUrl}/login?username=${userId}&password=${password}&authenticity_token=${loginToken} [POST]
30
Login Form URL:         ${serverUrl}/login
31
Login Token Pattern:    <input name="authenticity_token" type="hidden" value="(.+?)" />
32 2 Jean-Philippe Lang
</pre>
33 1 Jean-Philippe Lang
34 27 Felix Schäfer
Example (this screenshot is somewhat outdated, you can "send me":/users/3866 a newer one if you use Mylyn, thanks):
35 2 Jean-Philippe Lang
36 28 Felix Schäfer
p=. !mylyn-repository-properties-2.png!
37 26 Felix Schäfer
38 1 Jean-Philippe Lang
You can replace the _Query request URL_ parameter with the following if you want to get only the issues that are assigned to you:
39 2 Jean-Philippe Lang
40
  ${serverUrl}/issues?set_filter=1&assigned_to_id=me
41
42 15 Alistair MacDonald
The following Query pattern value reads Status, Owner and Tracker fields too (Mylyn 3.2.1) :
43 10 Etienne Massip
<pre>
44 28 Felix Schäfer
<td class="tracker">({Type}.+?)</td><td class="status">({Status}.+?)</td>.+?<td class="subject">.*?<a href=".*?/issues/({Id}\d+)">({Description}.+?)</a></td><td class="assigned_to"><a href.+?>({Owner}.+?)</a></td>
45 10 Etienne Massip
</pre>
46
47 1 Jean-Philippe Lang
Status is read as "uncomplete" or "complete" in Eclipse.
48 10 Etienne Massip
49 13 Mischa The Evil
h3. Create a Query
50 1 Jean-Philippe Lang
51
* On the task list, right-click and choose *New* -> *Query...*
52 2 Jean-Philippe Lang
* And select your newly created repository
53 7 steeven lee
54 1 Jean-Philippe Lang
p=. !mylyn-task-list.png!
55 7 steeven lee
56 13 Mischa The Evil
h2. Using specialized Redmine-Mylyn connector
57 7 steeven lee
58 13 Mischa The Evil
"Redmine-Mylyn Connector":http://redmin-mylyncon.wiki.sourceforge.net/Installation is another solution providing better integration with Mylyn.