This is an old revision of the document!


<h1>Process Feedback CodeBeamer specific</h1>

<div class=“level1”>
<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>

<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>
</div>

<h2>CodeBeamer config.xml</h2>

<div class=“level2”>
<p>To enable the following configuration section must be added in the

conf/config.xml

:</p>

<pre class=“code xml”>
&lt; ?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt; stages-config&gt;
&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>

<p>&nbsp;</p>
</div>

<h3>Basic Authentication</h3>

<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>

<pre class=“code xml”>
&lt; property name=&quot;user&quot; value=&quot;user&quot; /&gt;
&lt; property name=&quot;password&quot; value=&quot;secret&quot; /&gt;
&nbsp;
&nbsp;

</pre>

<p>&nbsp;</p>
</div>

<h4>CodeBeamer Server</h4>

<div class=“level4”>
<p>The

user

and

password

are the normal username and password of the user.</p>
</div>

<h4>CodeBeamer Tracker</h4>

<div class=“level4”>
<p>The

trackerId

of the targeted tracker. The

keyName

(short name) of the targeted tracker.</p>
</div>

<h3>Mandatory fields</h3>

<div class=“level3”>
<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”>
&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>

<p>&nbsp;</p>
</div>

<h3>How to get the project, tracker and field id</h3>

<div class=“level3”>&nbsp;</div>

<h4>Version 1: Via REST commands</h4>

<div class=“level4”>
<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>
<li class=“level1”>For project id:

 GET {serveradress}/cb/rest/v3/projects

</li>
<li class=“level1”>For tracker id:

 GET {serveradress}/cb/rest/v3/projects/{projectId}/trackers

</li>
<li class=“level1”>For field id:

 GET {serveradress}/cb/rest/v3/trackers/{trackerId}

</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>
</div>

<h4>Version 2: Via Codebeamer and calculation</h4>

<div class=“level4”>
<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>

<p>To locate the tracker id, go to the tracker page and look into the url:</p>

<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>

<p>Or configure the tracker via the context points and read the id directly in CodeBeamer:</p>

<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>

<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>

<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>

<p>This number has to be added to a base number, depending on the type of the field:</p>

<ul>
<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>

<div class=“level3”>
<ul>
<li class=“level1 node”>Description: Custom Field:
<ul>

   <li class="level3">Type Text: <code>targettype=&quot;TextFieldValue&quot;

</code> (default if no targetType is set)</li>

   <li class="level3">Type Wikilink/Url: <code>targettype=&quot;UrlFieldValue&quot;

</code> (required to set hyperlinks)</li>
</ul>
</li>
<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>