Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In your scripted report, data aggregation with Pivotopia could look like in example https://actonic.atlassian.net/wiki/spaces/ARB/pages/edit-v2/7177437201#Full-Scripted-Reports-example

Configuration

Where config could have different fields depending on the calculation type.

...

Calculation type

Description

matrix

A matrix ("pivot table") report type is a way to organize and display data in a two-dimensional grid or matrix format. It allows you to compare two sets of data by presenting them as rows and columns in a matrix. Each cell within the matrix represents the intersection of data from the respective row and column, making it easy to analyze relationships between these data points. Matrix reports are commonly used for comparing data across different dimensions, such as issue fields, worklog fields, comment fields, etc., providing a structured view of complex data for better insights and decision-making.

list

"List" report type provides a tabular representation of issues with any existing or calculated fields. It's a way to display issue information in a structured and compact format, making it easier to view and work with a list of issues. Every row of the report represents a single issue. The core value lies in the ability to use calculated fields such as “Age (Business days since creation)”, “Effort Variance”, etc (see “Issue: Example list of calculated fields” below).

number

Matrix calculation type

...

A number report displays a single or multiple numeric values, such as a total spent time, average remaining estimate, or any other quantitative metric for a scope of issues. This report are straightforward and focus on presenting a specific number without additional visual elements.

Matrix calculation type

For matrix calculation, at least one row and one measure is required.

Code Block
languagejs
{
    type: 'matrix';
    rows: Dimension[];
    cols?: Dimension[];
    measures: Measure[];
    orderBy?: OrderBy;
}

...

Dimensions are responsible for creating row headers and column headers Row Headers and Column Headers in Matrix report type, and for content cells in List report type.

...

Let's take a look at the configuration:

Code Block
languagejs
{
    type: 'matrix',
    rows: [{ name: 'project' }, { name: 'issueType' }],
    cols: [{ name: 'status' }],
    measures: [{ name: 'countOfIssues' }],
};

This configuration will show a matrix report with project and issue type in rows and statuses in columns. Both rows and columns are Dimensions. So they represent Row Headers and Column Headers in the calculation result:

Drawio
mVer2
zoom1
simple0
inComment0
custContentId7194247199
pageId7177437201
lbox1
diagramDisplayNamedimensions.drawio
contentVer2
revision2
baseUrlhttps://actonic.atlassian.net/wiki
diagramNamedimensions.drawio
pCenter1
width572.01
links
tbstyle
height632.5

Group

Format

Filter

Dimension filters allow to

System Dimensions (Jira System fields)

...

title

title

IMPLEMETED

title

IMPLEMETED

IMPLEMETEDDate

title

title

IMPLEMENTED

Name

Display Name

Scheme

Type

CategoryStatus

Description

countOfIssues

Count of Issues

Issue

Number

Count

Status
colourGreen
IMPLEMETED

Counts issues regardless of their statuses

countOfOpenedIssues

Count of Opened Issues

Issue

Number

Count

Status
colourGreen
titleIMPLEMETED

Counts issues where issues resolution is EMPTY

countOfResolvedIssues

Count of Resolved Issues

Issue

Number

Count

Status
colourGreen
IMPLEMETED

Counts issues where resolution is not EMPTY

countOfStatusChanges

Count Of Status Changes

Issue

Number

Count

Status
colourGreen
title

Issue

Number

Count

Counts number of times the issue changed its status

sumLoggedTime

Sum of logged time

issue.worklog

Duration

Sum

Status
colourGreen
titleIMPLEMETED

sumOfOriginalEstimate

Sum of Original Estimate

Issue

Duration

Sum

Status
colourGreen
IMPLEMENTED

Sum of values from Original estimate field

sumOfTimeRemaining

Sum of Time remaining

Issue

Duration

Sum

Status
colourGreen
titleIMPLEMENTED

Sum of values from Time remaining field

sumOfVotes

Mean of Votes

Issue

Number

Sum

Status
colourGreen
title

latestIssueCreationDate

Latest Issue Creation Date

Issue

Date

Date

Status
colourGreen
title

Issue

Date

Date

Calculates the latest date of the issue creation in a selected scope of issues

newestIssueCreationDate

Newest Issue Creation Date

Issue

Date

Date

Status
colourGreen
titleIMPLEMETED

Calculates the latest date of the issue creation in a selected scope of issues

sumOfAgeBusinessDays

Sum of Age (Business days)

Issue

Duration

Sum

Status
colourGreen
IMPLEMENTED

Sum of “Age (Business days since creation)” calculated field values

sumOfAgeCalendarDays

Sum of Age (Calendar days)

Issue

Duration

Sum

Status
colourGreen
titleIMPLEMENTED

Sum of “Age (Calendar days since creation)” calculated field values

sumOfBusinessDaysSinceUpdate

Sum of Business Days since last update

Issue

Duration

Sum

Status
colourGreen
IMPLEMENTED

Sum of “Business Days since last update” calculated field values

sumOfCalendarDaysSinceUpdate

Sum of Calendar Days since last update

Issue

Duration

Sum

Status
colourGreen
title

Sum

Sum of “Calendar Days since last update” calculated field values

Format

Depending on the measure type, there could be a few possible formatting options.

OrderBy (result sorting)

Ordering configuration is a part of Pivotopia input parameters. Depending on which column we are using for sorting, it could look like:

...

Code Block
languagejs
{ 
    type: 'matrix',
    rows: ['project'],
    cols: ['issuetype'],
    orderBy: {
      orderType: 'totalColumn',
      direction: 'desc',
      colNum: 0,
    },
    measures: ['countOfIssues'],
},

...

'countOfIssues'],
},

ResultSet

ResultSet is a result object, which Pivotopia returns after the calculation. It consists of 6 elements:

  • Row Headers

  • Column Headers

  • Data Cells

  • Total Row

  • Total Column

  • Grand Total

Drawio
mVer2
zoom1
simple0
inComment0
custContentId7188676638
pageId7177437201
lbox1
diagramDisplayNameresultset.drawio
contentVer1
revision1
baseUrlhttps://actonic.atlassian.net/wiki
diagramNameresultset.drawio
pCenter0
width562
links
tbstyle
height292

...

Full Scripted Reports example

Code Block
languagejs
...

  

// initialization
  
 const pivotopia = await SR.pivotopia.getPivotopiagetInstance();

    // aggregation configuration
   
const config = {
 
      type: 'matrix',
   
    rows: [{

           name: 'project'
   
    }],
   
    measures: [{
   
        name: 'sumLoggedTime',
  
     }],
    };
    // configuration validation
 
  const validatedConfig = pivotopia.getValidatedConfig(config);
   
// get required jira fields, needed for the data aggregation  
   const requiredFileds = pivotopia.getRequiredFieldsForConfig(validatedConfig);

    // get jira issues with required fields only
   
const issues = await SR.getIssuesByJQL('created > -7d', requiredFileds.join(','));
 
  // aggregate data
   
const resultSet = await pivotopia.calculate(pivotopia.jiraIssuesToFlatObjects(issues), validatedConfig);

   // convert aggregation results to a html table
   
const tableHtml = pivotopia.resultSetToHtmlTable(resultSet, validatedConfig);
   
console.log(tableHtml);
    
...

...