Scripted Reports input parameters

Field Values Query Parameter Usage

In order to transfer field values to the report, you need to use the field values query parameter.

It represents an encoded JSON string. The process of the formation of this string is divided into three stages.

  1. Form JS object representation of values that should be passed.

  2. Convert JS object to JSON string.

  3. Pass encoded JSON string as a field value query parameter.

Example:

// Form JS object representation of values that should be passed const fieldValues = {"stringField": "testString"}; // Convert JS object to JSON string const fieldValuesJSON = JSON.stringify(fieldValues); // Pass encoded JSON string as a fieldValues query parameter (in address line) ?fieldValues=${encodeURI(fieldValuesJSON)}

List of field values

Input parameter type

Expected format

Data example

Input parameter type

Expected format

Data example

String

<string>

“testString”

Number

<number>

10001

Issue Picker

{

“label”: <string>,

“value”: <string>

}

{ "label": "KT32-4 Issue A", "value": "KT32-4" }

 

Date

YYYY-MM-DD

"2021-08-08"

Checkbox

<boolean>

true

Textarea

<string>

“Textarea Text"

Radio Button

<string> (option value)

“optionValue”

JQL

<string>

"assignee = currentUser()"

Project Picker

{

“label”: <string>,

“value”: <string>

}

{ "label": "First Project (FP)", "value": "FP" }

 

User Picker

{

“label”: <string>,

“value”: <string>

}

 

Data Range Picker

{

“start” : YYYY-MM-DD,

“end”: YYYY-MM-DD,

“definedPeriod”: <periodValue>

}

List of period values: today,yesterday,thisWeek,lastWeek,thisMonth,lastMonth

 

Field Picker

{

“label”: <string>,

“value”: <string>

}

 

Issue Type Picker

{

“label”: <string>,

“value”: <string>

}

 

Select List

<string> (option value)

“selectItemValue”

 

Example: