Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
72:custom_reports_accessing_data_reading_process_milestone_report [2019/02/27 20:04] – created ext-bkkr | 72:custom_reports_accessing_data_reading_process_milestone_report [2019/02/27 20:53] – ext-bkkr | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Creating a Milestone Report ====== | ====== Creating a Milestone Report ====== | ||
+ | |||
+ | This example creates a milestone overview report which shows all assigned documents of a milestone together with the document state and document version. | ||
+ | |||
+ | 1. Create a Report with a Stages Data Source and a Data Set | ||
+ | |||
+ | 2. Create the following Data Set result columns | ||
+ | |||
+ | ^Name^Type| | ||
+ | |DocumentName|String| | ||
+ | |State|String| | ||
+ | |Version|String| | ||
+ | |milestone URL|String| | ||
+ | |process|String| | ||
+ | |||
+ | 3. Copy the Data Set script from the example into your Data Set. | ||
+ | |||
+ | **Example** | ||
+ | < | ||
+ | function getParent(myelement) { | ||
+ | var process = ""; | ||
+ | do { | ||
+ | var parent = | ||
+ | |||
+ | | ||
+ | if (parent[0].getProperty(" | ||
+ | | ||
+ | } | ||
+ | | ||
+ | | ||
+ | } while (parent[0].getProperty(" | ||
+ | | ||
+ | } | ||
+ | function Dump(artifact, | ||
+ | var reduced_view = ""; | ||
+ | var milestone_name = milestone.getProperty(" | ||
+ | var artifact_name = artifact.getProperty(" | ||
+ | var artifacts_instances = | ||
+ | | ||
+ | var artifact_id = artifact.getProperty(" | ||
+ | for each (artifacts_instance in artifacts_instances) { | ||
+ | var artifacts_instance_id = artifacts_instance.getProperty(" | ||
+ | | ||
+ | "< | ||
+ | id=" + | ||
+ | | ||
+ | | ||
+ | | ||
+ | "< | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | var parent = getParent(artifact); | ||
+ | if (parent) | ||
+ | | ||
+ | "< | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | } | ||
+ | } | ||
+ | var milestones = pkit.getCurrentProject(). | ||
+ | | ||
+ | | ||
+ | for each (milestone in milestones) { | ||
+ | if (milestone.getProperty(" | ||
+ | var artifacts = milestone.getEntities(" | ||
+ | for each (artifact in artifacts) { | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | \\ | ||