Differences

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

Link to this comparison view

Next revision
Previous revision
77:process_feedback_codebeamer [2021/03/23 09:33] – created mnwm77:process_feedback_codebeamer [2021/09/14 12:35] (current) – fnpk
Line 1: Line 1:
-<h1>Process Feedback CodeBeamer specific</h1>+====== Process Feedback Codebeamer specific ======
  
-<div class="level1">\\ +First of all, create a Codebeamer project where the feedback will be collected. If you want to collect more information than the summary and a description, you have to create a new tracker and add additional fields to it. Further information to creating and customizing trackers can be found at [[https://codebeamer.com/cb/wiki/23424|here]].
-<p>First of all, create a CodeBeamer project where the feedback will be collected. If you want to collect more information than the summary and a description, you have to create a new tracker and add additional fields to it. Further information to creating and customizing trackers can be found at <a class="urlextern" href="https://codebeamer.com/cb/wiki/23424" rel="nofollow" title="https://codebeamer.com/cb/wiki/23424">here</a>.</p>+
  
-<p>To configure Stages, the id of the target tracker is required. For custom fields, the customField ids are required. There are several ways to find them out (see below Configuration.xml - How to get the project, tracker and field id).</p>+To configure Stages, the id of the target tracker is required. For custom fields, the customField ids are required. There are several ways to find them out (see below Configuration.xml - How to get the project, tracker and field id).
  
-<p>Stages uses the CodeBeamer REST interface with Swagger V3 to create the trackerItem. <a class="urlextern" href="https://codebeamer.com/cb/wiki/11631738" rel="nofollow" title="https://codebeamer.com/cb/wiki/11631738">See here</a> for more information.</p>\\ +Stages uses the Codebeamer REST interface with Swagger V3 to create the trackerItem. [[https://codebeamer.com/cb/wiki/11631738|See here]] for more information.
-</div>+
  
-<h2>CodeBeamer config.xml</h2>+===== Codebeamer config.xml =====
  
-<div class="level2">\\ +To enable the following configuration section must be added in the ''conf/config.xml'': 
-<p>To enable the following configuration section must be added in the <code>conf/config.xml +<code xml> 
-</code>:</p>+<stages-config> 
 +  <!-- Insert this block to your stages config.xml file --> 
 +  <feedback-systems> 
 +    <feedback-system name="codebeamer"> 
 +      <host url="https://codebeamer.example.com/cb" ident="codebeamer1" displayName="Example Codebeamer">
  
-<pre class="code xml">\\ +        <!-- Credentials for a (technical) user who is allowed to create items in the Codebeamer project and tracker --> 
-&lt; ?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;\\ +        <property name="user" value="user" /> 
-&lt; stages-config&gt;\\ +        <property name="password" value="secret" />
-&lt; !-- Insert this block to your stages config.xml file --&gt;\\ +
-&lt; feedback-system name=&quot;CodeBeamer&quot;&gt;\\ +
-&lt; host url=&quot;https://codebeamer.example.com/cb&quot;&gt;\\ +
-&nbsp;\\ +
-&lt; !-- Credentials for a (technical) user who is allowed to create items in the CodeBeamer project and tracker --&gt;\\ +
-&lt; property name=&quot;user&quot; value=&quot;user&quot; /&gt;\\ +
-&lt; property name=&quot;password&quot; value=&quot;secret&quot; /&gt;\\ +
-&nbsp;\\ +
-&lt; !-- Define the tracker (with the trackerId and the correspoinding keyName) where the item should be created in  --&gt;\\ +
-&lt; property name=&quot;trackerId&quot; value=&quot;2267&quot; /&gt;\\ +
-&lt; property name=&quot;keyName&quot; value=&quot;TASK&quot; /&gt;\\ +
-&nbsp;\\ +
-&lt; !-- The summary field will always be available and is automatically mapped to the CodeBeamer name field --&gt;\\ +
-&nbsp;\\ +
-&lt; !--\\ +
-See common feedback documentation\\ +
-- The &quot;target&quot; defines the id of the custom field in CodeBeamer(e.g. &quot;customfield_10101&quot;).\\ +
-- Optional: The targetType defines the type of the CodeBeamer trackerField. Supported tracker fields see below.\\ +
---&gt;\\ +
-&lt; attributes&gt;\\ +
-&lt; attribute ident=&quot;description&quot; type=&quot;text&quot; target=&quot;description&quot; /&gt;\\ +
-&lt; /attributes&gt;\\ +
-&nbsp;\\ +
-&lt; !--\\ +
-See common feedback documentation\\ +
-The &quot;target&quot; defines the id for the custom field in CodeBeamer(e.g. &quot;10000&quot;).\\ +
-Optional: The targetType defines the type of the CodeBeamer tracker field. Supported tracker fields see below.\\ +
---&gt;\\ +
-&lt; system-attribute-mappings&gt;\\ +
-&lt; attribute source=&quot;elementUrl&quot; target=&quot;10000&quot; targettype=&quot;UrlFieldValue&quot; /&gt;\\ +
-&lt; attribute source=&quot;creatorUsername&quot; target=&quot;1000&quot; targettype=&quot;UserReference&quot; /&gt;\\ +
-&lt; /system-attribute-mappings&gt;\\ +
-&nbsp;\\ +
-&lt; !--\\ +
-See common feedback documentation\\ +
-The &quot;target&quot; defines the id for the custom field in CodeBeamer(e.g. &quot;10000&quot;).\\ +
-Optional: The targetType defines the type of the CodeBeamer field. Supported CodeBeamer fields see below.\\ +
---&gt;\\ +
-&lt; custom-attribute-mappings&gt;\\ +
-&lt; attribute value=&quot;Stages&quot; target=&quot;10001&quot; /&gt;\\ +
-&lt; /custom-attribute-mappings&gt;\\ +
-&lt; /host&gt;\\ +
-&lt; /feedback-system&gt;\\ +
-&lt; /stages-config&gt;\\ +
-&nbsp;\\ +
-&nbsp;+
  
-</pre>+        <!-- Define the tracker (with the trackerId and the correspoinding keyName) where the item should be created in  --> 
 +        <property name="trackerId" value="2267" /> 
 +        <property name="keyName" value="TASK" />
  
-<p>&nbsp;</p>\\ +        <!-- The summary field will always be available and is automatically mapped to the Codebeamer name field -->
-</div>+
  
-<h3>Basic Authentication</h3>+        <!-- 
 +        See common feedback documentation 
 +        - The "target" defines the id of the custom field in Codebeamer (e.g. "customfield_10101"). 
 +        - Optional: The targetType defines the type of the Codebeamer trackerField. Supported tracker fields see below. 
 +        --> 
 +        <attributes> 
 +            <attribute ident="description" type="text" target="description" /> 
 +        </attributes>
  
-<div class="level3">\\ +        <!-- 
-<p>You need credentials for a (technical) user who is allowed to create issues in the CodeBeamer project. This user also needs to be allowed to use the CodeBeamer APIs (be part of the Group &#39;API User&#39;)</p>+        See common feedback documentation 
 +        The "target" defines the id for the custom field in Codebeamer (e.g. "10000"). 
 +        Optional: The targetType defines the type of the Codebeamer tracker field. Supported tracker fields see below. 
 +        --> 
 +        <system-attribute-mappings> 
 +            <attribute source="elementUrl" target="10000" targetType="UrlFieldValue" /> 
 +            <attribute source="creatorUsername" target="1000" targetType="UserReference" /> 
 +        </system-attribute-mappings>
  
-<pre class="code xml">\\ +        <!-- 
-&lt; property name=&quot;user&quot; value=&quot;user&quot; /&gt;\\ +        See common feedback documentation 
-&lt; property name=&quot;password&quot; value=&quot;secret&quot; /&gt;\\ +        The "target" defines the id for the custom field in Codebeamer (e.g. "10000"). 
-&nbsp;\\ +        Optional: The targetType defines the type of the Codebeamer field. Supported Codebeamer fields see below. 
-&nbsp;+        --> 
 +        <custom-attribute-mappings> 
 +            <attribute value="Stages" target="10001" /> 
 +        </custom-attribute-mappings> 
 +      </host> 
 +    </feedback-system> 
 +  </feedback-systems> 
 +</stages-config> 
 +</code>
  
-</pre>+==== Basic Authentication ====
  
-<p>&nbsp;</p>\\ +You need credentials for a (technical) user who is allowed to create issues in the Codebeamer project. This user also needs to be allowed to use the Codebeamer APIs (be part of the Group 'API User')
-</div>+
  
-<h4>CodeBeamer Server</h4>+<code xml> 
 +<property name="user" value="user" /> 
 +<property name="password" value="secret" />
  
-<div class="level4">\\ 
-<p>The <code>user 
-</code> and <code>password 
-</code> are the normal username and password of the user.</p>\\ 
-</div> 
  
-<h4>CodeBeamer Tracker</h4>+</code>
  
-<div class="level4">\\ +=== Codebeamer Server ===
-<p>The <code>trackerId +
-</code> of the targeted tracker. The <code>keyName +
-</code> (short name) of the targeted tracker.</p>\\ +
-</div>+
  
-<h3>Mandatory fields</h3>+The ''user'' and ''password'' are the normal username and password of the user.
  
-<div class="level3">\\ +=== Codebeamer Tracker ===
-<p>For all issues, the fields name and description are mandatory. Name is automatically configured and will display the summary text. Description has to be configured in the configuration.xml as followed:</p>+
  
-<pre class="code xml">\\ +The ''trackerId'' of the targeted tracker. The ''keyName'' (short name) of the targeted tracker.
-&lt; attributes&gt;\\ +
-&lt; !-- map the stages-description (ident) into the codebeamer-description (target) --&gt;\\ +
-&lt; attribute ident=&quot;description&quot; type=&quot;text&quot; target=&quot;description&quot; /&gt;\\ +
-&lt; /attributes&gt;\\ +
-&nbsp;\\ +
-&nbsp;+
  
-</pre>+==== Mandatory fields ====
  
-<p>&nbsp;</p>\\ +For all issues, the fields name and description are mandatory. Name is automatically configured and will display the summary text. Description has to be configured in the configuration.xml as followed:
-</div>+
  
-<h3>How to get the project, tracker and field id</h3>+<code xml> 
 +<attributes> 
 +        <!-- map the stages-description (ident) into the codebeamer-description (target) --> 
 +        <attribute ident="description" type="text" target="description" /> 
 +</attributes>
  
-<div class="level3">&nbsp;</div> 
  
-<h4>Version 1: Via REST commands</h4>+</code>
  
-<div class="level4">\\ +==== How to get the project, tracker and field id ====
-<p>Just enter the following REST statements into your browser and login with your CodeBeamer username and password. Requires Permission to use CodeBeamer APIs (be part of the Group &#39;API User&#39;)</p>+
  
-<ul>\\ +=== Version 1: Via REST commands ===
- <li class="level1">For project id: <code> GET {serveradress}/cb/rest/v3/projects +
-</code></li>\\ +
- <li class="level1">For tracker id: <code> GET {serveradress}/cb/rest/v3/projects/{projectId}/trackers +
-</code></li>\\ +
- <li class="level1">For field id: <code> GET {serveradress}/cb/rest/v3/trackers/{trackerId} +
-</code></li>\\ +
-</ul>+
  
-<p>Or see CodeBeamer documentation for <a class="urlextern" href="https://codebeamer.com/cb/wiki/11375774#section-Getting+the+list+of+available+projects" rel="nofollow" title="https://codebeamer.com/cb/wiki/11375774#section-Getting+the+list+of+available+projects">Getting list of available projects</a>, <a class="urlextern" href="https://codebeamer.com/cb/wiki/11375774#section-Getting+the+list+of+trackers+in+a+specific+project" rel="nofollow" title="https://codebeamer.com/cb/wiki/11375774#section-Getting+the+list+of+trackers+in+a+specific+project"> Getting list of trackers in a project</a>, <a class="urlextern" href="https://codebeamer.com/cb/wiki/11375774#section-Getting+the+fields+of+a+tracker" rel="nofollow" title="https://codebeamer.com/cb/wiki/11375774#section-Getting+the+fields+of+a+tracker"> Getting the fields of a tracker</a>.</p>\\ +Just enter the following REST statements into your browser and login with your Codebeamer username and password. Requires Permission to use Codebeamer APIs (be part of the Group 'API User')
-</div>+
  
-<h4>Version 2: Via Codebeamer and calculation</h4>+  * For project id: '' GET {serveradress}/cb/rest/v3/projects'' 
 +  * For tracker id: '' GET {serveradress}/cb/rest/v3/projects/{projectId}/trackers'' 
 +  * For field id: '' GET {serveradress}/cb/rest/v3/trackers/{trackerId}''
  
-<div class="level4">\\ +Or see Codebeamer documentation for [[https://codebeamer.com/cb/wiki/11375774#section-Getting+the+list+of+available+projects|Getting list of available projects]], [[https://codebeamer.com/cb/wiki/11375774#section-Getting+the+list+of+trackers+in+a+specific+project| Getting list of trackers in a project]], [[https://codebeamer.com/cb/wiki/11375774#section-Getting+the+fields+of+a+tracker| Getting the fields of a tracker]].
-<p>To locate the project id, edit the project via the context points and look into the url:</p>+
  
-<p><img alt="" class="media" height="543" src="https://doc.stagesasaservice.com/lib/exe/fetch.php?w=1119&amp;h=543&amp;tok=3dae9e&amp;media=https%3A%2F%2Fdoc.stagesasaservice.com%2Flib%2Fplugins%2Fckgedit%2Ffckeditor%2Fuserfiles%2Fimage%2F75%2Fcb_findprojectid_1.png" width="1119" /></p>+=== Version 2: Via Codebeamer and calculation ===
  
-<p>To locate the tracker id, go to the tracker page and look into the url:</p>+To locate the project id, edit the project via the context points and look into the url:
  
-<p><img alt="" class="media" height="326" src="https://doc.stagesasaservice.com/lib/exe/fetch.php?w=1372&amp;h=326&amp;tok=44850c&amp;media=https%3A%2F%2Fdoc.stagesasaservice.com%2Flib%2Fplugins%2Fckgedit%2Ffckeditor%2Fuserfiles%2Fimage%2F75%2Fcb_findtrackerid_2.png" width="1372" /></p>+{{https://doc.stagesasaservice.com/lib/plugins/ckgedit/fckeditor/userfiles/image/75/cb_findprojectid_1.png?nolink&1119x543}}
  
-<p>Or configure the tracker via the context points and read the id directly in CodeBeamer:</p>+To locate the tracker id, go to the tracker page and look into the url:
  
-<p><img alt="" class="media" height="539" src="https://doc.stagesasaservice.com/lib/exe/fetch.php?w=1130&amp;h=539&amp;tok=d27999&amp;media=https%3A%2F%2Fdoc.stagesasaservice.com%2Flib%2Fplugins%2Fckgedit%2Ffckeditor%2Fuserfiles%2Fimage%2F75%2Fcb_findtrackerid_1_1.png" width="1130" /></p>+{{https://doc.stagesasaservice.com/lib/plugins/ckgedit/fckeditor/userfiles/image/75/cb_findtrackerid_2.png?nolink&1372x326}}
  
-<p>To calculate the field id, configure the tracker with the field, select the field tab and click on the field name. At the top, a number is displayed in brackets.</p>+Or configure the tracker via the context points and read the id directly in Codebeamer:
  
-<p><img alt="" class="media" height="719" src="https://doc.stagesasaservice.com/lib/exe/fetch.php?w=1032&amp;h=719&amp;tok=1c5019&amp;media=https%3A%2F%2Fdoc.stagesasaservice.com%2Flib%2Fplugins%2Fckgedit%2Ffckeditor%2Fuserfiles%2Fimage%2F75%2Fcb_findfieldid_1_1.png" width="1032" /></p>+{{https://doc.stagesasaservice.com/lib/plugins/ckgedit/fckeditor/userfiles/image/75/cb_findtrackerid_1_1.png?nolink&1130x539}}
  
-<p>This number has to be added to a base number, depending on the type of the field:</p>+To calculate the field id, configure the tracker with the field, select the field tab and click on the field name. At the top, a number is displayed in brackets.
  
-<ul>\\ +{{https://doc.stagesasaservice.com/lib/plugins/ckgedit/fckeditor/userfiles/image/75/cb_findfieldid_1_1.png?nolink&1032x719}}
- <li class="level1">CustomFields: Base Number is 10000, add the displayed number to get the field id.</li>\\ +
- <li class="level1">ChoiceField: Base Number is 1000, add the displayed number to get the field id.</li>\\ +
-</ul>\\ +
-</div>+
  
-<h3>Supported CodeBeamer Tracker Fields and Types</h3>+This number has to be added to a base number, depending on the type of the field:
  
-<div class="level3">\\ +  * CustomFields: Base Number is 10000, add the displayed number to get the field id. 
-<ul>\\ +  * ChoiceField: Base Number is 1000, add the displayed number to get the field id. 
- <li class="level1 node">Description: Custom Field:\\ + 
- <ul>\\ +==== Supported Codebeamer Tracker Fields and Types ==== 
-     <li class="level3">Type Text: <code>targettype=&quot;TextFieldValue&quot; + 
-</code> (default if no targetType is set)</li>\\ +  * Description: Custom Field: 
-     <li class="level3">Type Wikilink/Url: <code>targettype=&quot;UrlFieldValue&quot; +      * Type Text: ''targetType="TextFieldValue"''  (default if no targetType is set) 
-</code> (required to set hyperlinks)</li>\\ +      * Type Wikilink/Url: ''targetType="UrlFieldValue"''  (required to set hyperlinks) 
- </ul>\\ +  * Description: Choice Field: 
- </li>\\ +      * Type Text: ''targetType="UserReference"''  (required to set the requester automatically. Requester's username must be identical in Stages and Codebeamer)
- <li class="level1 node">Description: Choice Field:\\ +
- <ul>\\ +
-     <li class="level3">Type Text: <code>targettype=&quot;UserReference&quot; +
-</code> (required to set the requester automatically. Requester&#39;s username must be identical in Stages and CodeBeamer)</li>\\ +
- </ul>\\ +
- </li>\\ +
-</ul>\\ +
-</div>+