Project

General

Profile

HowTo Mylyn » History » Version 44

Hans Kaiser, 2013-11-14 12:27

1 1 Jean-Philippe Lang
h1. HowTo connect a Mylyn repository to Redmine
2
3 13 Mischa The Evil
{{>TOC}}
4 1 Jean-Philippe Lang
5 27 Felix Schäfer
These instructions should work with redmine 0.9 stable and up.
6
7 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.
8
9
h2. Using specialized Redmine-Mylyn connector
10
11 44 Hans Kaiser
The Redmine Mylyn Connector is under "volatile" development. So you will find multiple pages and forks, here are some jump points.
12
http://www.redmine.org/boards/1/topics/10923
13
http://sourceforge.net/projects/redmin-mylyncon/
14
http://danmunn.github.io/redmine_mylyn_connector/
15
16
h3. The sourceforge way
17
The "Redmine-Mylyn Connector":http://sourceforge.net/projects/redmin-mylyncon/ is another solution providing better integration with Mylyn (Note: for version 2 of Redmine, the updated redmine plugin can be found "here":http://danmunn.github.com/redmine_mylyn_connector and also an updated Redmine connector plugin for Eclipse (Mylyn) which solves some problems with newer versions is "here":https://github.com/ljader/redmine-mylyn-plugin).
18 29 Felix Schäfer
19 30 Felix Schäfer
p=. !redmin-mylyncon.png!
20
21 13 Mischa The Evil
h2. Using the generic web repository connector
22
23 1 Jean-Philippe Lang
"Mylyn":http://www.eclipse.org/mylyn is an Eclipse plugin for task management.
24
This HowTo explains how to connect to Redmine using the generic web repository connector.
25
26 6 Mischa The Evil
Note that the generic web repository connector is not part of the default Mylyn install.
27 39 Etienne Massip
So, you have to install it first from the "_incubator_ update site":http://download.eclipse.org/mylyn/incubator/3.8.
28 1 Jean-Philippe Lang
29 13 Mischa The Evil
h3. Create a Task Repository
30 1 Jean-Philippe Lang
31
# Right-click on the task repositories list and click *Add task repository*
32 5 Jeffrey Price
# Choose _Web Template (Advanced)_ and click *Next*
33 1 Jean-Philippe Lang
# Configure the repository:
34 2 Jean-Philippe Lang
35 1 Jean-Philippe Lang
<pre>
36
Server:                 http://www.redmine.org -- Replace it with the URL of your Redmine instance
37 27 Felix Schäfer
Task URL:               ${serverUrl}/issues/
38 1 Jean-Philippe Lang
New task URL:           ${serverUrl}/projects/foo/issues/new -- Replace foo with the identifier of the project used for new tasks
39
Query request URL:      ${serverUrl}/issues
40 27 Felix Schäfer
Query pattern:          <td class="subject">.*?<a href="/issues/(\d+)">(.+?)</a></td>
41
Login request URL:      ${serverUrl}/login?username=${userId}&password=${password}&authenticity_token=${loginToken} [POST]
42
Login Form URL:         ${serverUrl}/login
43 2 Jean-Philippe Lang
Login Token Pattern:    <input name="authenticity_token" type="hidden" value="(.+?)" />
44 1 Jean-Philippe Lang
</pre>
45
46 29 Felix Schäfer
Example:
47 2 Jean-Philippe Lang
48 28 Felix Schäfer
p=. !mylyn-repository-properties-2.png!
49 26 Felix Schäfer
50 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:
51 2 Jean-Philippe Lang
52
  ${serverUrl}/issues?set_filter=1&assigned_to_id=me
53
54 15 Alistair MacDonald
The following Query pattern value reads Status, Owner and Tracker fields too (Mylyn 3.2.1) :
55 10 Etienne Massip
<pre>
56 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>
57 10 Etienne Massip
58 1 Jean-Philippe Lang
Status is read as "uncomplete" or "complete" in Eclipse.
59 2 Jean-Philippe Lang
60 7 steeven lee
h3. Create a Query
61 1 Jean-Philippe Lang
62 7 steeven lee
* On the task list, right-click and choose *New* -> *Query...*
63 13 Mischa The Evil
* And select your newly created repository
64 7 steeven lee
65 13 Mischa The Evil
p=. !mylyn-task-list.png!