This is an old revision of the document!


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-system name="redmine">
 
    <!-- Url to the Redmine server -->
    <host url="http://redmine.example.com">
 
      <!-- 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  -->
 
      <!--
      The user will be asked to enter the following text fields. All text fields are optional.
      - The "ident" must be unique and is used to identify the right translation property.
      - 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>
 
      <!--
      You can map element specify information to your Redmine item. These sources are available:
      - elementUrl e.g. https://stages.example.com/stages/index.html#/workspace/200/_vv/(process/activity/_wUV9sBbNHr-aicWx33VsQA)
      - workspaceName e.g. "Software Engineering"
      - workspacePath e.g. "Company | Software"
      - creatorFullname "John Doe"
      - creatorUsername "jdoe"
      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" />
        <attribute source="workspaceName" target="2" />
        <attribute source="workspacePath" target="3" />
        <attribute source="creatorFullname" target="4" />
        <attribute source="creatorUsername" target="assigned_to_id" targetType="user"/>
      </system-attribute-mappings>
    </host>
  </feedback-system>
</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.

For example:

<attribute ident="customURL" type="text" target="1" 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.