Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
72:custom_reports_getting_started_creating_reports [2019/02/15 18:47] – ext-bkkr | 72:custom_reports_getting_started_creating_reports [2019/02/15 20:06] – ext-bkkr | ||
---|---|---|---|
Line 15: | Line 15: | ||
==== Create a Stages Data Source ==== | ==== Create a Stages Data Source ==== | ||
- | - To create a new Data Source, navigate | + | - Navigate |
- | - Select **Stages Data Source**. Enter a name for the data source. In the example, the default name is used. | + | - Select **Stages Data Source**. Enter a name for the data source. |
- Click **Next**. | - Click **Next**. | ||
- | - If you do not use the PkitMetrics.xml you need to specify the <font inherit/ | + | - If you do not use the PkitMetrics.xml you need to specify the Stages server URL and enter a Stages username and password |
- | - If you use PkitMetrics.xml, | + | - If you use the PkitMetrics.xml, |
- | - Insert the [[: | + | - Insert the [[: |
==== Create a Data Set ==== | ==== Create a Data Set ==== | ||
- | - Navigate to the **Outline View** on the lower left side and right-click on **Data Set **and select **New Data Set**. | + | - Navigate to the **Outline View** |
+ | - Select a name for the Data Set, and click **Next**. | ||
+ | - Enter the column names and data types | ||
+ | - <font inherit/ | ||
+ | - <font inherit/ | ||
+ | - Click **Next**. | ||
+ | - Click **Edit Script** | ||
+ | - Enter the following script into the editor | ||
+ | |||
+ | < | ||
+ | var artifacts = | ||
+ | pkit.getCurrentProject().getEntities(" | ||
+ | [0].getEntities(" | ||
+ | for (i = 0; i < | ||
+ | var artifacts_instances = | ||
+ | | ||
+ | for (j = 0; j < | ||
+ | var artifacts_revisions = | ||
+ | | ||
+ | if (artifacts_revisions.length == 0) { | ||
+ | dataset.setColumnValue(" | ||
+ | } else { | ||
+ | | ||
+ | | ||
+ | } | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | To finish the editing of the script, click **OK**. | ||
+ | |||
+ | Enter a //Current metric //in the text input field. The current metric is the Stages path to an existing Stages metric element or workspace name combined with the metric name. You can see both ways in the example below. A metric element with the name " | ||
+ | - //Note: The current metric value is needed for the preview, if the script contains the statement //<font inherit/ | ||
+ | - Click **Finish** | ||
+ | |||
+ | ==== Create a Data Set ==== | ||
+ | |||
+ | - Navigate to the **Outline View** | ||
- Select a name for the Data Set, and click **Next**. | - Select a name for the Data Set, and click **Next**. | ||
- Enter the column names and data types | - Enter the column names and data types | ||
Line 33: | Line 73: | ||
- Enter the following script into the editor | - Enter the following script into the editor | ||
- | - | ||
+ | |||
< | < | ||
var artifacts = | var artifacts = | ||
Line 55: | Line 96: | ||
} | } | ||
</ | </ | ||
- | - To finish the editing of the script, click **OK**. | + | |
- | | + | To finish the editing of the script, click **OK**. |
- | - //Note: The current metric value is needed for the preview, if the script contains the statement //<font inherit/ | + | |
- | - Click **Finish** to continue the data set configuration and click **Preview Results** to show a preview of the results. | + | Enter a //Current metric //in the text input field. The current metric is the Stages path to an existing Stages metric element or workspace name combined with the metric name. You can see both ways in the example below. A metric element with the name " |
+ | - //Note: The current metric value is needed for the preview, if the script contains the statement //<font inherit/ | ||
+ | - Click **Finish** | ||