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”>
< ?xml version="1.0" encoding="UTF-8" ?>
< stages-config>
< !– Insert this block to your stages config.xml file –>
< feedback-system name="CodeBeamer">
< host url="https://codebeamer.example.com/cb">
< !– Credentials for a (technical) user who is allowed to create items in the CodeBeamer project and tracker –>
< property name="user" value="user" />
< property name="password" value="secret" />
< !– 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" />
< !– The summary field will always be available and is automatically mapped to the CodeBeamer name field –>
< !–
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>
< !–
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>
< !–
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 field. Supported CodeBeamer fields see below.
–>
< custom-attribute-mappings>
< attribute value="Stages" target="10001" />
< /custom-attribute-mappings>
< /host>
< /feedback-system>
< /stages-config>
</pre>
<p> </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 'API User')</p>
<pre class=“code xml”>
< property name="user" value="user" />
< property name="password" value="secret" />
</pre>
<p> </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”>
< attributes>
< !– map the stages-description (ident) into the codebeamer-description (target) –>
< attribute ident="description" type="text" target="description" />
< /attributes>
</pre>
<p> </p>
</div>
<h3>How to get the project, tracker and field id</h3>
<div class=“level3”> </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 'API User')</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&h=543&tok=3dae9e&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&h=326&tok=44850c&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&h=539&tok=d27999&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&h=719&tok=1c5019&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="TextFieldValue"
</code> (default if no targetType is set)</li>
<li class="level3">Type Wikilink/Url: <code>targettype="UrlFieldValue"
</code> (required to set hyperlinks)</li>
</ul>
</li>
<li class=“level1 node”>Description: Choice Field:
<ul>
<li class="level3">Type Text: <code>targettype="UserReference"
</code> (required to set the requester automatically. Requester's username must be identical in Stages and CodeBeamer)</li>
</ul>
</li>
</ul>
</div>