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/02 14:57] – [Supported Redmine Issue Fields] tssr75:process_feedback_redmine [2024/02/15 00:00] (current) – external edit 127.0.0.1
Line 2: Line 2:
  
 First of all, create or choose a Redmine project where the feedback will be collected. First of all, create or choose a Redmine project where the feedback will be collected.
 +You need to get the identifier for that project:
 +
 +{{ :feedback:redmine:project-identifier.png?300 |}}
 +
 +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.
 +
 +{{ :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 will use the [[https://www.redmine.org/projects/redmine/wiki/Rest_api|Redmine REST API]] interface to create the items.
Line 20: Line 27:
       <property name="apiAccessKey" value="*****" />       <property name="apiAccessKey" value="*****" />
              
- 
       <!-- Set the project identifier where the issue should be created in -->       <!-- Set the project identifier where the issue should be created in -->
       <property name="projectIdentifier" value="myProjectIdentifier" />       <property name="projectIdentifier" value="myProjectIdentifier" />
Line 27: Line 33:
  
       <!--       <!--
-      The user will be asked to enter the following text fields. All text fields are optional. +      See common feedback documentation
-      - 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 "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.       - The targetType defines whether the value is a custom attribute or built-in and defines the type of the value.
Line 36: Line 41:
       -->       -->
       <attributes>       <attributes>
-        <attribute ident="description" type="text" target="Description" targetType="longtext" />+        <attribute ident="description" type="text" target="description" />
       </attributes>       </attributes>
  
       <!--       <!--
-      You can map element specify information to your Redmine item. These sources are available: +      See common feedback documentation
-      - 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").       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)       (To get the custom field ids go to http://redmine.excample.com/issues/[issueId].json)
Line 51: Line 51:
       -->       -->
       <system-attribute-mappings>       <system-attribute-mappings>
-        <attribute source="elementUrl" target="Element Url" /> +        <attribute source="elementUrl" target="1" /> 
-        <attribute source="workspaceName" target="Workspace Name" /> +        <attribute source="workspaceName" target="2" /> 
-        <attribute source="workspacePath" target="Workspace Path" /> +        <attribute source="workspacePath" target="3" /> 
-        <attribute source="creatorFullname" target="Creator Fullname" /> +        <attribute source="creatorFullname" target="4" /> 
-        <attribute source="creatorUsername" target="Assigned User" targetType="user"/>+        <attribute source="creatorUsername" target="assigned_to_id" targetType="user"/>
       </system-attribute-mappings>       </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>     </host>
   </feedback-system>   </feedback-system>
Line 63: Line 73:
  
 ==== Supported Redmine Issue Fields ===== ==== Supported Redmine Issue Fields =====
-  * subject: targetType="" +Example: 
-  * description: targetType="'' + 
-  * assigned_to_id: targetType="'user'+<code xml><attribute ident="attributeIdent" type="text" target="description" /></code> 
-  * custom_fields: targetType="'custom[.targetType]'" -> See section about custom fields+ 
 +  * 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 ===== ==== Supported Redmine Custom Fields =====
Line 77: Line 91:
 Supported Custom Field Types: Supported Custom Field Types:
  
-  * Text: "targetType="custom''" +  * Text: <nowiki>targetType="custom''</nowiki> 
-  * Long text: "targetType="'custom'" +  * Long text: <nowiki>targetType="custom''</nowiki> 
-  * Boolean: "targetType="custom''" +  * Boolean: <nowiki>targetType="custom''</nowiki> 
-  * Link: "targetType="custom''" +  * Link: <nowiki>targetType="custom''</nowiki> 
-  * User: "targetType="'custom.user'"+  * 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.