Simple integration of MS Project and Redmine

    Epigraph


    “If I were to put Nikanor Ivanovich’s lips to Ivan Kuzmich’s nose, take some swagger like Baltazar Baltazarych’s, and perhaps add Ivan Pavlovich’s further adversity to this, I would 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 own merits, and these merits could perfectly complement each other.


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


    What good is Project:


    • It is convenient to edit the project as a whole in document mode - a spreadsheet. It is also a plus that several projects can be quickly combined into a consolidated one and viewed as a whole. (In Redmine, project tasks are edited only one at a time through the task form).
    • All kinds of variety and flexibility of connections between tasks (in Redmine, communications are implemented minimalistically).
    • Monitoring resource loading and the ability to automatically distribute tasks on a calendar, taking into account relationships and resource loading. Including "inhuman" resources such as equipment, facilities, etc. (There is none of this in Redmine; the tool was created for another.)

    What is good about Redmine:


    • A free product on Ruby On Rails, quite simple, well customizable and extensible, with an active community, a large selection of plugins, actively developed
    • Web and teamwork. As a result, it’s very convenient to record the progress of each task, including the change log, correspondence and discussions on the task, files, individual reports on the hours spent, etc. (There is nothing of this in Project.)

    It would be convenient to prepare projects in MS Project, send them for execution to Redmine, get the actual terms of tasks and estimated / spent hours from there, compare them with previously saved baseline, making adjustments if necessary. (It’s especially convenient, for example, in a situation like ours at work: there is a stream of projects with a regular structure, which must be formed according to templates, slightly specified and given to work.)


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


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


    Preparing an MSP project for publication and synchronization requires a minimum of action.


    1. P2R stores Redmine task identifiers in the Hyperlink attribute of the MSP tasks. To mark a task for publication, you need to put 0 in this attribute. After publication, P2R will automatically change this field to the real task ID and at the same time generate the correct URL in the HyperlinkAddress attribute, so the link will be clickable. (Of course, then you should not forget to save the MSP project, it is not automatically saved.)
    2. P2R also stores Redmine user IDs in the “Hyperlink” attribute of MSP resources. To associate this resource with a Redmine user, you need to find the user ID from the Redmine admin. (The admin has access to the list of users and can see their ID, for example, in the links in the list).
    3. P2R takes access parameters in Redmine from a special task called “Redmine Synchronization”. You need to create such a task and put the access parameters in the “Notes” field in the YAML format according to the sample (the parameter values, of course, must be replaced with your 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.


    This parameter redmine_project_uuidincludes a unique project code you need to come up with in accordance with the rules of Redmine, which can be found through the page to customize any project. If a “Unprocessable Entry” error occurs when creating a project, most likely you have selected the incorrect project uuid.


    The parameter is task_default_redmine_tracker_idoptional. If you omit it, the default track from the Redmine settings will be affixed.


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


    1. Add a parameter to the Redmine Synchronization settings redmine_project_idand put the Redmine project ID there. This is not uuid! This integer is the ID of the entry 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/10000000/projects/test.json ).
    2. For tasks to be synchronized with existing ones in Redmine, put in the Hyperlink field not their zeros, but their real Redmine IDs.

    There is a slight restriction on assigning resources to a task:


    • Since only one executor can be assigned to a task in Redmine, the script will swear and stop when it finds more than one resource in the MSP task marked for synchronization. (1) It is possible that in future versions this behavior will be replaced by a more gentle one, such as issuing a warning and randomly choosing one of them. (2) Resources that are not synchronized can be assigned as many as you want, P2R ignores them.

    The following synchronization algorithm is implemented:


    • The name of the task, the subordination structure, and the person responsible take precedence on the MSP side, i.e. they need to be edited in MS Project, and the changes will go to Redmine during synchronization.
    • The beginning of the task, the end, labor costs (assessment and actual) take priority on the Redmine side and go to MSP during synchronization.

    There is also a problem with labor costs: in MSP the estimation of labor costs, actual labor costs and percentage of completion are tightly connected by the formula, while in Redmine they are set independently. That is, they rated it at 10 hours, spent 40 hours and at the same time completed the task by 30%. It happens in life, and Redmine doesn't mind. The solution chosen is:


    • Actual costs are always written as is
    • If the actual costs are greater than the estimate and the completion percentage is 0, ignore the estimate
    • If the actual costs are greater than the estimate and the percentage of completion is not 0, we calculate a new estimate based on the fact and percentage of completion.

    In total, the synchronization 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 we look, what changes will be.
    3. We start the actual synchronization: with the –e switch.

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


    You can start the script by timer, and synchronization will become completely automatic.


    Thank you for attention.


    Also popular now: