📜 ⬆️ ⬇️

Easy integration of MS Project and Redmine

Epigraph


“If I’d put Nikanor Ivanovich’s lips on Ivan Kuzmich’s nose, take some kind of swagger, like Balthazar’s Balthazarych, and, perhaps, add Ivan Pavlovich’s prettiness to it, I’d have to immediately decide.” N.V. Gogol. Marriage.



There are two well-known and very different project management tools: MS Project and Redmine. Each of them has its advantages, and these advantages could perfectly complement each other.


I want to offer to your attention a small utility called P2R, which allows, without any installation and with a minimum of settings, to provide online synchronization of projects in MS Project and Redmine. It is available at .


What is good Project:



What is good for Redmine:



It would be convenient to prepare projects in MS Project, send them for execution to Redmine, receive actual deadlines of tasks and estimated / spent hours from there, compare them with previously saved baseline, make adjustments if necessary. (Especially convenient, for example, in a situation like at work: there is a flow of projects with a regular structure, which need to be formed according to templates, slightly specified and given to work.)


There are Rredmine plugins for this integration. But they do the integration through uploading-loading xml-files, but I want it without files and simpler.


The proposed P2R script is written in ruby ​​and works with MS Project via OLE, and with Redfmine via API. If ruby ​​is not installed, you can take the same script compiled in .exe (it lies in the downloads folder, formed by the ocra utility).


Preparing an MSP project for publishing and synchronization requires a minimum of actions.


  1. P2R stores Redmine task IDs in the Hyperlink attribute of MSP tasks. To mark a task for publishing, you need to put 0 in this attribute. After publishing, P2R will automatically change this field to the real task ID and at the same time form the correct URL in the HyperlinkAddress attribute, so the link will be clickable. (Understandably, the MSP project must then be saved, it is not automatically saved.)
  2. P2R stores Redmine user IDs also in the Hyperlink attribute of MSP resources. To associate this resource with the Redmine user, you need to get the user ID from the Redmine admin. (The admin has access to the list of users and can see their IDs, for example, in the links in the list).
  3. P2R takes access parameters to Redmine from a special task called “Redmine Synchronization”. Such a task should be created and put the access parameters in the “Notes” field in the YAML format according to the sample (the values ​​of the parameters, of course, should be replaced with their own):

    redmine_host: 192.168.10.10 redmine_port: 3000 redmine_api_key: a21e583e7670b1fc79378441d485b9608e4c2dc4c redmine_project_uuid: test task_default_redmine_tracker_id: 4 resource_default_redmine_role_id: 4 

After that, the project is ready for synchronization. The purpose of the parameters is clear from their names.


The redmine_project_uuid parameter contains a unique project code that you need to think up in accordance with the Redmine rules, which can be found through the settings page of any project. If the “Unprocessable Entry” error occurs when creating a project, you most likely have chosen an incorrect project uuid.


The task_default_redmine_tracker_id parameter task_default_redmine_tracker_id optional. If you omit it, the default track will be set from the Redmine settings.


If you want to not create a new project in Redmine, but connect an existing one, do the following:


  1. Add the redmine_project_id parameter to the Redmine Synchronization settings and put the Redmine project ID there. This is not uuid! This integer is the ID of the record in the Redmine database. You can find this ID, for example, in the project card in XML or JSON format (for the above example, you can get it at http://192.168.10.10.06000/projects/test.json ).
  2. For tasks to be synchronized with existing ones in Redmine, put in the Hyperlink field not zeros, but their real Redmine ID.

There is a small limitation with the assignment of resources to the task:



The following synchronization algorithm has been implemented:



There is also a problem with labor costs: in MSP, labor costs, actual labor costs and the percentage of performance are strictly related to the formula, while in Redmine, they are set independently. That is, it was estimated at 10 hours, spent 40 hours and at the same time completed the task by 30%. In life, it happens, and Redmine does not mind. The solution chosen is:



So the sync process looks like this:


  1. We open our project in MS Project and leave it active.
  2. If we want, we start the idle run of P2R and see what changes there will be.
  3. We start the actual synchronization: with the –e key.

The working directory from which the script is run does not matter.


You can make the script run on a timer, and synchronization will become completely automatic.


Thank you for attention.


')

Source: https://habr.com/ru/post/452982/


All Articles