Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
72:custom_reports_accessing_data_reading_issues [2019/02/07 14:05] – created ext-bkkr | 72:custom_reports_accessing_data_reading_issues [2019/03/06 18:21] – ext-bkkr | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Reading Issues from Stages ====== | ====== Reading Issues from Stages ====== | ||
+ | |||
+ | This example reads all issues from the current project and returns a given number of columns. | ||
+ | |||
+ | 1. Create a Report with a Stages Data Source and a Data Set. | ||
+ | |||
+ | 2. Create the following Data Set result columns: | ||
+ | |||
+ | ^Name^Type| | ||
+ | |# | ||
+ | |title|String| | ||
+ | |description|String| | ||
+ | |modification_date|String| | ||
+ | |state|String| | ||
+ | |||
+ | //Notice: The name of the columns must be the same as the ident name of the issue tracker attributes in the PKitRequest.xml configuration// | ||
+ | |||
+ | 3. Copy the Data Set script from the example into your Data Set. | ||
+ | |||
+ | < | ||
+ | /* | ||
+ | * Stores all Issues (filtered by filterfunc) with or without history | ||
+ | */ | ||
+ | function GetRequests(myProject, | ||
+ | var requests = myProject.getEntities(" | ||
+ | for each (request in requests) { | ||
+ | if (withHistory) { | ||
+ | var histories = request.getEntities(" | ||
+ | for each (history in histories) { | ||
+ | if ((filterfunc.call(arguments[1], | ||
+ | for each (AllColumn in AllColumns ) { | ||
+ | | ||
+ | } | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } else { | ||
+ | for each (request in requests) { | ||
+ | if ((filterfunc.call(arguments[1], | ||
+ | for each (AllColumn in AllColumns ) { | ||
+ | | ||
+ | } | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | function myfilter(request) { | ||
+ | var val = request.getProperty(" | ||
+ | | ||
+ | } | ||
+ | var AllColumns = new Array("# | ||
+ | " | ||
+ | | ||
+ | </ | ||
+ | |||
+ | \\ | ||