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
77:process_feedback [2021/07/07 11:31] fnpk77:process_feedback [2024/02/15 00:00] (current) – external edit 127.0.0.1
Line 12: Line 12:
   <!-- Insert this block to your stages config.xml file -->   <!-- Insert this block to your stages config.xml file -->
   <feedback-systems>   <feedback-systems>
-    <feedback-system name="jira|rtc|redmine|ptcilm">+    <feedback-system name="jira|rtc|redmine|ptcilm|codebeamer|link">
       <host url="https://some.example.com/feedback-system" ident="system1" displayName="Feedback System 1">       <host url="https://some.example.com/feedback-system" ident="system1" displayName="Feedback System 1">
  
Line 22: Line 22:
  
         <system-attribute-mappings>         <system-attribute-mappings>
-          <attribute source="elementUrl" target="MyField" targetType="MyField" targetType="MyFieldType" />+          <attribute source="elementUrl" target="MyField" targetType="MyFieldType" />
         </system-attribute-mappings>         </system-attribute-mappings>
  
Line 35: Line 35:
   </feedback-systems>   </feedback-systems>
 </stages-config> </stages-config>
 +
 +
 </code> </code>
 +
 +It is possible to define multiple feedback system types and feedback hosts. The first host in the first feedback system type will be the default feedback system. You can change the feedback system for each workspace in the workspace settings:
 +
 +[[https://doc.stagesasaservice.com/lib/exe/detail.php?id=77:process_feedback&media=77:workspace_feedback_system.png|{{:77:workspace_feedback_system.png}}]]
  
 ==== Stages config ==== ==== Stages config ====
Line 41: Line 47:
 The changes in ''config.xml'' are system specific. Please refer the right manual page: The changes in ''config.xml'' are system specific. Please refer the right manual page:
  
-  * [[:77:process_feedback_jira|Jira]]+   * [[:77:process_feedback_jira|Jira]]
   * [[:77:process_feedback_ptcilm|PTC Integrity (ILM)]]   * [[:77:process_feedback_ptcilm|PTC Integrity (ILM)]]
   * [[:77:process_feedback_redmine|Redmine]]   * [[:77:process_feedback_redmine|Redmine]]
Line 48: Line 54:
   * [[:77:process_feedback_link|Link / Issue collector]]   * [[:77:process_feedback_link|Link / Issue collector]]
  
- +=== Properties ===
-===  Properties ===+
  
 <code xml> <code xml>
 <property name="propertyKey" value="propertyValue" /> <property name="propertyKey" value="propertyValue" />
 +
 +
 </code> </code>
  
Line 63: Line 70:
 <code xml> <code xml>
 <attribute ident="description" type="text" target="MyDescriptionField" targetType="MyFieldType" /> <attribute ident="description" type="text" target="MyDescriptionField" targetType="MyFieldType" />
 +
 +
 </code> </code>
  
   * ''ident'': Stages translation property   * ''ident'': Stages translation property
   * ''type'': Type of text field in Stags:   * ''type'': Type of text field in Stags:
-    * ''string'': Text Field (single line) +      * ''string'': Text Field (single line) 
-    * ''text'': Text Field (multi line) +      * ''text'': Text Field (multi line) 
-  * ''target'' and ''targetType'': Defines feedback system specific configuration +  * ''target''  and ''targetType'': Defines feedback system specific configuration
 === System Attribute Mappings === === System Attribute Mappings ===
  
Line 77: Line 85:
 <code xml> <code xml>
 <attribute source="elementUrl" target="MyField" targetType="MyField" targetType="MyFieldType" /> <attribute source="elementUrl" target="MyField" targetType="MyField" targetType="MyFieldType" />
 +
 +
 </code> </code>
  
-  * ''source'': Which information from Stages should be taken +  * ''source'': Which information from Stages should be taken. See also picture below. 
-    * ''elementUrl'': Url to element +      * Attributes of current view where the user provides feedback 
-    * ''elementStableUrl'': Url to element with specific version (Since Stages 7.5.1.3+        * ''elementName'': e.g. "Analyze Scope" (Since Stages 7.8) 
-    * ''originElementUrl'': Url to editable element if current element is imported by module import (Since Stages 7.5.1.3+        * ''elementShortname'': e.g. "AS" (Since Stages 7.8
-    * ''originElementStableUrl'': Url to editable element with specific version if current element is imported by module import (Since Stages 7.5.1.3+        * ''elementLabel'': e.g. "AS: Analyze Scope" (Since Stages 7.8
-    * ''elementIdentity'': e.g. _wUV9sBbNHr-aicWx33VsQA (Since Stages 7.5.1.3) +        * ''elementType'': e.g. "Workflow" (Since Stages 7.8
-    * ''processVersionName'': e.g. V1 (Since Stages 7.5.1.3) +        * ''elementIdentity'': e.g. _wUV9sBbNHr-aicWx33VsQA (Since Stages 7.5.1.3) 
-    * ''workspaceName'': e.g. Software Engineering +        * ''elementUrl'': Url to element 
-    * ''workspacePath'': e.g. Company > Software +        * ''elementStableUrl'': Url to element with specific version (Since Stages 7.5.1.3) 
-    * ''workspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.1.3) +        * ''processVersionName'': e.g. V1 (Since Stages 7.5.1.3) 
-    * ''originWorkspaceName'': e.g. Software Engineering (Since Stages 7.5.2.2) +        * ''workspaceName'': e.g. Software Engineering 
-    * ''originWorkspacePath'': e.g. Company > Software (Since Stages 7.5.2.2) +        * ''workspacePath'': e.g. Company > Software 
-    * ''originWorkspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.2.2+        * ''workspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.1.3) 
-    * ''creatorFullname'': e.g. John Doe +        * ''creatorFullname'': e.g. John Doe 
-    * ''creatorUsername'': e.g. jdoe +        * ''creatorUsername'': e.g. jdoe 
-    * ''creatorEmail'': e.g. jdoe@example.com (Since Stages 7.5.2.2) +        * ''creatorEmail'': e.g. jdoe@example.com (Since Stages 7.5.2.2) 
-  * ''target'' and ''targetType'': Defines feedback system specific configuration+      * If process element was imported by module import, then the following attributes belongs to the imported source module. Otherwise or if process element is overwritten the attributes belongs to current view (Since Stages 7.9) 
 +        * ''sourceModuleElementUrl'': Url to element if current element is imported by module import 
 +        * ''sourceModuleElementStableUrl'': Url to element with specific version if current element is imported by module import 
 +        * ''sourceModuleWorkspaceName'': e.g. Software Engineering 
 +        * ''sourceModuleWorkspacePath'': e.gCompany > Software 
 +        * ''sourceModuleWorkspaceFullPath'': e.g. Company > Software > Software Engineering 
 +      * If process element was imported by multiple module imports, then the following attributes belongs to the module where the process element was created originally and can be edited. Otherwise or if process element is overwritten the attributes belongs to current view 
 +        * ''originElementUrl'': Url to editable element if current element is imported by module import (Since Stages 7.5.1.3
 +        * ''originElementStableUrl'': Url to editable element with specific version if current element is imported by module import (Since Stages 7.5.1.3) 
 +        * ''originWorkspaceName'': e.g. Software Engineering (Since Stages 7.5.2.2) 
 +        * ''originWorkspacePath'': e.g. Company > Software (Since Stages 7.5.2.2) 
 +        * ''originWorkspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.2.2) 
 +  * ''target''  and ''targetType'': Defines feedback system specific configuration 
 +[[https://doc.stagesasaservice.com/lib/exe/detail.php?id=77:process_feedback&media=77:feedback-source.png|{{  :77:feedback-source.png?400  }}]]
  
 === Custom Attribute Mappings === === Custom Attribute Mappings ===
Line 105: Line 128:
 <code xml> <code xml>
 <attribute value="Stages" target="MySourceSystemField" targetType="MyFieldType" /> <attribute value="Stages" target="MySourceSystemField" targetType="MyFieldType" />
 +
 +
 </code> </code>
  
   * ''value'': The value that should be mapped   * ''value'': The value that should be mapped
-  * ''target'' and ''targetType'': Defines feedback system specific configuration +  * ''target''  and ''targetType'': Defines feedback system specific configuration
 === Script Attribute Mappings === === Script Attribute Mappings ===
  
-If you want to map more complex values to your feedback system, then it's possible to run a script in Stages to aggregate more mappings. The script is able to access the Facade API. Create a script ''feedback-demo.js'' like this and store it to your Stages conf folder:+If you want to map more complex values to your feedback system, then it's possible to run a script in Stages to aggregate more mappings. The script is able to access the Facade API. Create a script ''feedback-demo.js''  like this and store it to your Stages conf folder:
  
 <code javascript> <code javascript>
-var user = currentElement.getProperty("LastChangeUser"); +if(currentElement) { 
-result.mappings.put("lastChangedBy", user); +    var user = currentElement.getProperty("LastChangeUser"); 
-result.properties.put("project", "Demo");+    result.mappings.put("lastChangedBy", user); // Add script-attribute-mapping 'lastChangedBy' 
 +} 
 +result.properties.put("project", "Demo"); // Override property 'project' 
 + 
 </code> </code>
  
-Add to your feedback host configuration the attribute ''script'' with the file name as value and add a ''script-attribute-mappgings'' section:+Add to your feedback host configuration the attribute ''script''  with the file name as value and add a ''script-attribute-mappings''  section:
  
 <code xml> <code xml>
Line 137: Line 165:
   </feedback-systems>   </feedback-systems>
 </stages-config> </stages-config>
 +
 +
 </code> </code>
  
-The script can access the process element of the feedback ''currentElement''.+The script can access to several information of the process: 
 + 
 +  * Current process element: ''currentElement''  (in case of process start page it is null) 
 +  * Current user: ''currentUser'' 
 +  * Logger: ''log'' 
 +  * Pkit: ''pkit'' 
 +      * Current version of process: ''pkit.getCurrentProcess()'' 
 +      * Current workspace: ''pkit.getCurrentProject()'' 
 +      * … 
 + 
 +The script cannot access the information that the user entered into an Attribute. 
 + 
 +All results have to be stored to the predefined ''result''  variable. 
 + 
 +  * Values in ''result.mappings''  are configurable in the xml via ''script-attribute-mappings'' 
 +  * Values in ''result.properties''  will add or override the ''properties''  of the xml file
  
-All results have to be stored to the predefined ''result'' variable. 
-  * Values in ''result.mappings'' are configurable in the xml via ''script-attribute-mappings'' 
-  * Values in ''result.properties'' will add or override the ''properties'' of the xml file 
  
 ==== Stages metamodel ==== ==== Stages metamodel ====
  
-The feedback widget must be added to your Stages metamodel. The XML-Element is:+The feedback widget must be added to your Stages metamodel. We suggest to consult your Product Consultant for this step. 
 + 
 +The XML-Element is:
  
 <code xml> <code xml>
Line 174: Line 218:
  
 </code> </code>
 +
  
 ==== Stages language properties ==== ==== Stages language properties ====
  
-As last step you have to provide translations for the introduced custom fields. The translation property consists of the prefix ''process.feedback.mapping.'' and the ident you defined in the config.xml file. For the example the translations are:+As last step you have to provide translations for the introduced custom fields. The translation property consists of the prefix ''process.feedback.mapping.''  and the ident you defined in the config.xml file. For the example the translations are:
  
 <code properties> <code properties>