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/10/19 13:36] fnpk77:process_feedback [2024/02/15 00:00] (current) – external edit 127.0.0.1
Line 47: 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 89: Line 89:
 </code> </code>
  
-  * ''source'': Which information from Stages should be taken +  * ''source'': Which information from Stages should be taken. See also picture below. 
-      * ''elementName'': e.g. "Analyze Scope" (Since Stages 7.8) +      * Attributes of current view where the user provides feedback 
-      * ''elementShortname'': e.g. "AS" (Since Stages 7.8) +        * ''elementName'': e.g. "Analyze Scope" (Since Stages 7.8) 
-      * ''elementLabel'': e.g. "AS: Analyze Scope" (Since Stages 7.8) +        * ''elementShortname'': e.g. "AS" (Since Stages 7.8) 
-      * ''elementType'': e.g. "Workflow" (Since Stages 7.8) +        * ''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) 
-      * ''elementUrl'': Url to element +        * ''elementIdentity'': e.g. _wUV9sBbNHr-aicWx33VsQA (Since Stages 7.5.1.3) 
-      * ''elementStableUrl'': Url to element with specific version (Since Stages 7.5.1.3) +        * ''elementUrl'': Url to element 
-      * ''originElementUrl'': Url to editable element if current element is imported by module import (Since Stages 7.5.1.3) +        * ''elementStableUrl'': Url to element with specific version (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) +        * ''processVersionName'': e.g. V1 (Since Stages 7.5.1.3) 
-      * ''processVersionName'': e.g. V1 (Since Stages 7.5.1.3+        * ''workspaceName'': e.g. Software Engineering 
-      * ''workspaceName'': e.g. Software Engineering +        * ''workspacePath'': e.g. Company > Software 
-      * ''workspacePath'': e.g. Company > Software +        * ''workspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.1.3) 
-      * ''workspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.1.3) +        * ''creatorFullname'': e.g. John Doe 
-      * ''originWorkspaceName'': e.g. Software Engineering (Since Stages 7.5.2.2+        * ''creatorUsername'': e.g. jdoe 
-      * ''originWorkspacePath'': e.g. Company > Software (Since Stages 7.5.2.2) +        * ''creatorEmail'': e.g. jdoe@example.com (Since Stages 7.5.2.2
-      * ''originWorkspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.2.2) +      * 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) 
-      * ''creatorFullname'': e.g. John Doe +        * ''sourceModuleElementUrl'': Url to element if current element is imported by module import 
-      * ''creatorUsername'': e.g. jdoe +        * ''sourceModuleElementStableUrl'': Url to element with specific version if current element is imported by module import 
-      * ''creatorEmail'': e.g. jdoe@example.com (Since Stages 7.5.2.2)+        * ''sourceModuleWorkspaceName'': e.g. Software Engineering 
 +        * ''sourceModuleWorkspacePath'': e.g. Company > 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   * ''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 129: Line 139:
  
 <code javascript> <code javascript>
-var user = currentElement.getProperty("LastChangeUser"); +if(currentElement) { 
-result.mappings.put("lastChangedBy", user); // Add script-attribute-mapping 'lastChangedBy'+    var user = currentElement.getProperty("LastChangeUser"); 
 +    result.mappings.put("lastChangedBy", user); // Add script-attribute-mapping 'lastChangedBy' 
 +}
 result.properties.put("project", "Demo"); // Override property 'project' result.properties.put("project", "Demo"); // Override property 'project'
  
Line 157: Line 169:
 </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. All results have to be stored to the predefined ''result''  variable.
Line 163: Line 185:
   * Values in ''result.mappings''  are configurable in the xml via ''script-attribute-mappings''   * 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   * 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 193: Line 218:
  
 </code> </code>
 +
  
 ==== Stages language properties ==== ==== Stages language properties ====