Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
75:process_feedback_redmine [2020/04/14 09:04] tssr75:process_feedback_redmine [2024/02/15 00:00] (current) – external edit 127.0.0.1
Line 1: Line 1:
-==== Supported Redmine Issue Fields ====+====== Process Feedback Redmine specific ======
  
-  * subject: <nowiki>targetType=""</nowiki> +First of all, create or choose a Redmine project where the feedback will be collected. 
-  * description<nowiki>targetType=""</nowiki> +You need to get the identifier for that project:
-  * assigned_to_id: <nowiki>targetType="user"</nowiki> +
-  * custom_fields: <nowiki>targetType="custom[.targetType]"</nowiki> → See section about custom fields+
  
-==== Supported Redmine Custom Fields ====+{{ :feedback:redmine:project-identifier.png?300 |}}
  
-Custom fields have unique ID and can be written using this ID.+Second, you need user for creating the issues in that project. Navigate to the account details page and get the API access key from there.
  
-For example:+{{ :feedback:redmine:access-key.png?300 |}}
  
 +Stages will use the [[https://www.redmine.org/projects/redmine/wiki/Rest_api|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'':
 <code xml> <code xml>
-<attribute ident="customURLtype="text" target="1targetType="custom"/>+<?xml version="1.0encoding="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  -->
 +
 +      <!--
 +      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" />
 +        <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>
 +      
 +      <!--
 +      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>
 +</stages-config>
 </code> </code>
 +
 +==== Supported Redmine Issue Fields =====
 +Example:
 +
 +<code xml><attribute ident="attributeIdent" type="text" target="description" /></code>
 +
 +  * subject: <nowiki>targetType=""</nowiki> (Subject is always enabled and must not be configured in config.xml)
 +  * description: <nowiki>targetType=""</nowiki>
 +  * assigned_to_id: <nowiki>targetType="user"</nowiki>
 +  * custom_fields: <nowiki>targetType="custom[.targetType]"</nowiki> -> See section about custom fields
 +
 +==== Supported Redmine Custom Fields =====
 +
 +Custom fields have a unique ID and can be written using this ID.
 +
 +For example:
 +<code xml><attribute ident="customURL" type="text" target="1" targetType="custom"/></code>
  
 Supported Custom Field Types: Supported Custom Field Types:
Line 25: Line 97:
   * User: <nowiki>targetType="custom.user''</nowiki>   * User: <nowiki>targetType="custom.user''</nowiki>
  
 +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: <nowiki>https://<redmine-server-name>/issues/1.json </nowiki>.
 +
 +You will get the structure of the issue in JSON format as follows:
 +
 +{{ :feedback:redmine:custom-fields.png?200 |}}
 +
 +==== Be aware ====
  
 +  * If you choose target type **user**, then the users must be valid Redmine users. Otherwise the ticket creation will fail.