Tags:
not added yet
Table of Contents
Report operationsCodeBeamer reporting functionalityCodeBeamer has a rich reporting section where users can list, group and accumulate different tracker item fields from various projects and trackers. This page will walk you through how to create a simple report like this:
However to read more about the possibilities of the codeBeamer reporting engine please read the detailed documentation. Creating a reportThe POST /v3/reports endpoint accepts a SimpleReportSetting model to create reports in codeBeamer.
SimpleReportSetting model attributescbQLThe cbQL query which defines the set of items as the base of the report. nameThe name of the newly created query. descriptionThe description of the query. columnsThis property will define the list of columns which are made of specific tracker fields. From the example above:
To get hold on the reference of a tracker field the GET /v3/trackers/{trackerId}/fields can be queried. In our example we will need the Summary, Status, Business Value, Assigned to, Modified by, Modified at, Submitted by and Story Points fields to be our columns. [ ... { "id": 2, "name": "Business Value", "type": "FieldReference", "trackerId": 2764 }, { "id": 3, "name": "Summary", "type": "FieldReference", "trackerId": 2764 }, ... { "id": 5, "name": "Assigned to", "type": "FieldReference", "trackerId": 2764 }, { "id": 6, "name": "Submitted by", "type": "FieldReference", "trackerId": 2764 }, { "id": 7, "name": "Status", "type": "FieldReference", "trackerId": 2764 }, ... { "id": 19, "name": "Story Points", "type": "FieldReference", "trackerId": 2764 }, ... { "id": 74, "name": "Modified at", "type": "FieldReference", "trackerId": 2764 }, { "id": 75, "name": "Modified by", "type": "FieldReference", "trackerId": 2764 }, ... ] ResizableReportColumnSettings model can be used to define a column.
For example our first column will refer to the Summary field. Using the FieldReference from the previous query, we will need to construct an item like this: { "field": { "id": 3, "name": "Summary", "type": "FieldReference", "trackerId": 2764 }, "columnIndex": 0 } Please note: each column must define its index explicitly as the columns are rearrangeable. A list of these ResizableReportColumnSettings models will define the layout of our report. addedPermissionsBy default only the creator will be able to see the report itself, using this property read and write permissions can be added for different roles in projects:
To add a specific read/write permission for a role a ReportPermission model can be used:
To acquire the project reference we need to call the GET /v3/projects API: [ { "id": 8, "name": "Intland Software's Scrum Template", "type": "ProjectReference" } ] To find out what kind of roles are defined in our project we can call the GET /v3/roles endpoint: [ { "id": 1, "name": "Project Admin", "type": "RoleReference" }, ... { "id": 5, "name": "Developer", "type": "RoleReference" }, ... ] With these information we can construct our ReportPermission model for Project Admins: { "project": { "id": 8, "name": "Intland Software's Scrum Template", "type": "ProjectReference" }, "role": { "id": 1, "name": "Project Admin", "type": "RoleReference" }, "access": "READ" } A list of these ReportPermission models will define the access permissions for the report. showAncestorsA flag on enable the Show Ancestor functionality. More details here: Reports showDescendantsA flag on enable the Show Descendant functionality. More details here: Reports showAllChildrenA flag to enable the lookup for all children for a tracker item. Updating the report settingsPUT /v3/reports/{reportId} will update an existing report. Getting the report resultsGET /v3/reports/{reportId}/results will return a report result in a table like format. Response example: { "report": { "id": 3731, "name": "Simple report 2", "type": "ReportReference" }, "cbQL": "project.id IN (8) AND tracker.id IN (2764)", "columns": [ { "columnRef": "0-3", "field": { "id": 3, "name": "Summary", "type": "FieldReference", "trackerId": 2764 }, "name": "Summary", "type": "text", "columnIndex": 0 }, { "columnRef": "0-7", "field": { "id": 7, "name": "Status", "type": "FieldReference", "trackerId": 2764 }, "name": "Status", "type": "choice", "columnIndex": 1 }, ... ], "pagingInformation": { "page": 1, "pageSize": 25, "pageCount": 2 }, "data": { "type": "ReportGroupWithRows", "header": "Grand Total", "count": 25, "rows": [ { "itemRef": { "itemId": 1094, "trackerId": 2764 }, "cells": [ { "columnRef": "0-3", "value": "[REQ-1094] Navigation system" }, { "columnRef": "0-7", "value": "Draft" }, ... ], "outlineLevel": 0, "isRealResult": true }, { "itemRef": { "itemId": 1097, "trackerId": 2764 }, "cells": [ { "columnRef": "0-3", "value": "[REQ-1097] Navigation storage support" }, { "columnRef": "0-7", "value": "Waiting for approval" }, ... ], "outlineLevel": 1, "isRealResult": true }, ... ] }, "showAllChildren": false } Structure of the report resultcbQLThe underlying cbQL query. columnsIt contains the defined columns in the report with their column references. Example definition of the Summary column: { "columnRef": "0-3", "field": { "id": 3, "name": "Summary", "type": "FieldReference", "trackerId": 2764 }, "name": "Summary", "type": "text", "columnIndex": 0 } The columnRef will be used to connect the value attributes with their column definition. It consist of the trackerId and the fieldId separated by a dash sign. Reports can be created from multiple trackers therefore the built-in fields can be referenced with 0 trackerId creating tracker independent column definitions. pagingInformationContains the basic paging information attributes. dataIt contains the groups and rows of the table. The root element is always a ReportGroupWithRows or ReportGroupWithGroups containing the Grand Total summary. Inside the Grand Total element there can be additional groups if the cbQL attribute defines so, but the leaf elements are ReportGroupWithRows models: { "type": "ReportGroupWithRows", "header": "Grand Total", "count": 25, "rows": [ { "itemRef": { "itemId": 1094, "trackerId": 2764 }, "cells": [ { "columnRef": "0-3", "value": "[REQ-1094] Navigation system" }, { "columnRef": "0-7", "value": "Draft" }, ... ], "outlineLevel": 0, "isRealResult": true }, ... ] } Getting the tracker items related to a reportGET /v3/reports/{reportId}/items will return a report result as TrackerItem models. Example result: { "page": 1, "pageSize": 25, "total": 28, "items": [ { "item": { "id": 1094, "name": "Navigation system", "description": "Navigation system\r\n\r\n\r\n[{Image wiki='[!7230a1f747037e4b72708d7b3687e4f1.png!]' width='381' height='256' }]\r\n\r\n\r\nThis has to be smaller.\r\n\r\n\r\n\\\\\r\n\\\\", "descriptionFormat": "Wiki", "createdAt": "2020-08-06T09:57:19.639", "createdBy": { "id": 1, "name": "bond", "type": "UserReference" }, "modifiedAt": "2020-08-06T09:57:19.639", "modifiedBy": { "id": 1, "name": "bond", "type": "UserReference" }, "version": 1, "assignedTo": [], "tracker": { "id": 2764, "name": "Requirements", "type": "TrackerReference" }, "children": [ { "id": 1097, "name": "Navigation storage support", "type": "TrackerItemReference" }, { "id": 1095, "name": "Enable satellite navigation", "type": "TrackerItemReference" }, { "id": 1096, "name": "Provide Points of interest (waypoints)", "type": "TrackerItemReference" }, { "id": 1098, "name": "Integrations and other functions", "type": "TrackerItemReference" } ], "customFields": [], "priority": { "id": 0, "name": "Unset", "type": "ChoiceOptionReference" }, "status": { "id": 2, "name": "Draft", "type": "ChoiceOptionReference" }, "categories": [], "subjects": [ { "id": 1011, "name": "As User, I want to have a navigation system in my car", "type": "TrackerItemReference" } ], "resolutions": [], "severities": [], "teams": [], "versions": [], "ordinal": 1, "typeName": "Requirement", "comments": [ { "id": 2724, "name": "7230a1f747037e4b72708d7b3687e4f1.png", "type": "CommentReference" }, { "id": 2727, "name": "Comment by Sales on 18.11.2015 16:31", "type": "CommentReference" } ] }, "outlineLevel": 0, "isRealResult": true }, ... ] } |
Fast Links
codebeamer Overview codebeamer Knowledge Base Services by Intland Software |
This website stores cookies on your computer. These cookies are used to improve your browsing experience, constantly optimize the functionality and content of our website, furthermore helps us to understand your interests and provide more personalized services to you, both on this website and through other media. With your permission we and our partners may use precise geolocation data and identification through device scanning. You may click accept to consent to our and our partners’ processing as described above. Please be aware that some processing of your personal data may not require your consent, but you have a right to object to such processing. By using our website, you acknowledge this notice of our cookie practices. By accepting and continuing to browse this site, you agree to this use. For more information about the cookies we use, please visit our Privacy Policy.Your preferences will apply to this website only.
Note that user-behavior analytics are being captured on this server for the purpose of improving the Codebeamer user experience.