Process Feedback Redmine specific

First of all, create or choose a Redmine project where the feedback will be collected. You need to get the identifier for that project:

Second, you need a user for creating the issues in that project. Navigate to the account details page and get the API access key from there.

Stages will use the Redmine REST API interface to create the items.

Stages config.xml

To enable the following configuration section must be added in the conf/config.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<stages-config>
  <!-- Insert this block to your stages config.xml file -->
  <feedback-systems>
    <feedback-system name="redmine">
 
        <!-- Url to the Redmine server -->
        <host url="http://redmine.example.com" ident="redmine1" displayName="Example Redmine">
 
        <!-- The api access key to authenticate against the Redmine server -->
        <property name="apiAccessKey" value="*****" />
 
        <!-- Set the project identifier where the issue should be created in -->
        <property name="projectIdentifier" value="myProjectIdentifier" />
 
        <!-- The summary field will always be available and is automatically mapped to the "subject" field  -->
 
        <!--
        See common feedback documentation
        - The "target" defines the name of the field in Redmine (e.g. "assigned_to_id").
        - The targetType defines whether the value is a custom attribute or built-in and defines the type of the value.
        - e.g. targetType="custom.text" targetType="custom.user"
        - "custom" defaults to "custom.text"
        - missing targetType defaults to "text"
        -->
        <attributes>
            <attribute ident="description" type="text" target="description" />
        </attributes>
 
        <!--
        See common feedback documentation
        The "target" defines the custom field id for the field in Redmine (e.g. "1").
        (To get the custom field ids go to http://redmine.excample.com/issues/[issueId].json)
        Optional: The targetType defines the type of the Redmine field. Supported fields see below.
        -->
        <system-attribute-mappings>
            <attribute source="elementUrl" target="1" targetType="custom" />
            <attribute source="workspaceName" target="2" targetType="custom" />
            <attribute source="workspacePath" target="3" targetType="custom" />
            <attribute source="creatorFullname" target="4" targetType="custom" />
            <attribute source="creatorUsername" target="assigned_to_id" targetType="user"/>
        </system-attribute-mappings>
 
        <!--
        See common feedback documentation
        The "target" defines the custom field id for the field in Redmine (e.g. "1").
        (To get the custom field ids go to http://redmine.excample.com/issues/[issueId].json)
        Optional: The targetType defines the type of the Redmine field. Supported fields see below.
        -->
        <custom-attribute-mappings>
            <attribute value="Stages" target="MySourceSystemField" />
        </custom-attribute-mappings>
        </host>
    </feedback-system>
  </feedback-systems>
</stages-config>

Supported Redmine Issue Fields

Example:

<attribute ident="attributeIdent" type="text" target="description" />
  • subject: targetType="" (Subject is always enabled and must not be configured in config.xml)
  • description: targetType=""
  • assigned_to_id: targetType="user"
  • custom_fields: targetType="custom[.targetType]" → See section about custom fields

Supported Redmine Custom Fields

Custom fields have a unique ID and can be written using this ID.

Example for attribute mapping:

<attribute ident="impact" type="text" target="1" targetType="custom"/>

Example for system attribute mapping:

<attribute source="elementUrl" target="2" targetType="custom"/>

Supported Custom Field Types:

  • Text: targetType="custom"
  • Long text: targetType="custom"
  • Boolean: targetType="custom"
  • Link: targetType="custom"
  • User: targetType="custom.user"

To identify the IDs of the custom fields of your issues, log in to redmine. Make sure, there is at least one existing issue in the project. Navigate to this URL: https://<redmine-server-name>/issues/1.json .

You will get the structure of the issue in JSON format as follows:

Be aware

  • If you choose target type user, then the users must be valid Redmine users. Otherwise the ticket creation will fail.