HowTo Mylyn » History » Version 32

Felix Schäfer, 2011-01-10 22:03
R. Eberly: "We were seeing tasks that are not assigned to anybody grouped with each other. The modified regex makes the assigned_to part of the match optional."

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
5 13 Mischa The Evil
6 1 Jean-Philippe Lang
7 27 Felix Schäfer
These instructions should work with redmine 0.9 stable and up.
9 29 Felix Schäfer
There are 2 options to connect Mylyn to redmine: either install the connector in your redmine install (this obviously needs the ability to install a plugin on the redmine you want to use it with), or use the generic web connector, which scraps the html pages for the information it needs, and thus should work with pretty much every up-to-date enough redmine installation out there.
h2. Using specialized Redmine-Mylyn connector
13 31 Felix Schäfer
The "Redmine-Mylyn Connector": is another solution providing better integration with Mylyn.
14 29 Felix Schäfer
15 30 Felix Schäfer
p=. !redmin-mylyncon.png!
17 13 Mischa The Evil
h2. Using the generic web repository connector
19 1 Jean-Philippe Lang
"Mylyn": is an Eclipse plugin for task management.
This HowTo explains how to connect to Redmine using the generic web repository connector.
22 6 Mischa The Evil
Note that the generic web repository connector is not part of the default Mylyn install.
23 1 Jean-Philippe Lang
So, you have to install it first from the _incubator_ update site (see
25 13 Mischa The Evil
h3. Create a Task Repository
26 1 Jean-Philippe Lang
# Right-click on the task repositories list and click *Add task repository*
28 5 Jeffrey Price
# Choose _Web Template (Advanced)_ and click *Next*
29 1 Jean-Philippe Lang
# Configure the repository:
30 2 Jean-Philippe Lang
31 1 Jean-Philippe Lang
Server:        -- Replace it with the URL of your Redmine instance
33 27 Felix Schäfer
Task URL:               ${serverUrl}/issues/
34 1 Jean-Philippe Lang
New task URL:           ${serverUrl}/projects/foo/issues/new -- Replace foo with the identifier of the project used for new tasks
Query request URL:      ${serverUrl}/issues
36 27 Felix Schäfer
Query pattern:          <td class="subject">.*?<a href="/issues/(\d+)">(.+?)</a></td>
Login request URL:      ${serverUrl}/login?username=${userId}&password=${password}&authenticity_token=${loginToken} [POST]
Login Form URL:         ${serverUrl}/login
39 2 Jean-Philippe Lang
Login Token Pattern:    <input name="authenticity_token" type="hidden" value="(.+?)" />
40 1 Jean-Philippe Lang
42 29 Felix Schäfer
43 2 Jean-Philippe Lang
44 28 Felix Schäfer
p=. !mylyn-repository-properties-2.png!
45 26 Felix Schäfer
46 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:
47 2 Jean-Philippe Lang
50 15 Alistair MacDonald
The following Query pattern value reads Status, Owner and Tracker fields too (Mylyn 3.2.1) :
51 10 Etienne Massip
52 32 Felix Schäfer
<td class="tracker">({Type}.+?)</td><td class="status">({Status}.+?)</td>.+?<td class="subject">.*?<a href=".*?/issues/({Id}\d+)">({Description}.+?)</a></td>({Optional}<td class="assigned_to"><a href.+?>({Owner}.+?)</a></td>)?</pre>
53 10 Etienne Massip
54 1 Jean-Philippe Lang
Status is read as "uncomplete" or "complete" in Eclipse.
55 2 Jean-Philippe Lang
56 7 steeven lee
h3. Create a Query
57 1 Jean-Philippe Lang
58 7 steeven lee
* On the task list, right-click and choose *New* -> *Query...*
59 13 Mischa The Evil
* And select your newly created repository
60 7 steeven lee
61 13 Mischa The Evil
p=. !mylyn-task-list.png!