Versions Compared

Key

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

On this page:

Table of Contents
excludeSee also

The screen script enables you to determine if an action requires additional input and to build a form where the user can fill in the necessary data.

Input

...

Types

Power Actions™ provide a variety of input fields to suit your needs. 

Category

Input Type

...

Examples

Content

HTML content

Image Added

Wiki content

No options, single value

Text

...

Image Added

...

Text Area

Single Checkbox

Date Picker

Date Time Picker

User Picker

No options, multiple values

...

File Upload

Image Added

Multiple options, one selectable value

Select List

...

Image Added

Radio Group

Multiple options, multiple selectable values

...

Multi Select List

Image Added

Checkbox Group

Anchor
new-method
new-method

Creating the

...

Starting with versions 2.0.8 and 2.6.1 we have improved the screen, so now all you have to do to add an input on the screen is call the respective routine for that input type. No more adding to a huge array and returning it. Note that returning the array will revert to using the old method which does not support newer input types.

Screen

The input fields are created using a script that contains specially designed routines that create the fields. See the following pages for each routine that can create an input:

Child pages (Children Display)
pageInput Type Routines

Additional Screen Building Routines

...

...

Available in v2.0.8 for Jira 5 and v2.6.1 for Jira 6 and above

In addition to adding controls to the screen, Power Actions™ provide more routines to control the way your screen is displayed. For example, changing the dialog title, the text on the submit button.

See the following pages for each routine that can interact with the screen:

Child pages (Children Display)
pageDialog Control Routines

Creating the screen (up to v2.0.7 for Jira 5 and 2.6.0 for Jira 6)

Warning
titleDeprecation

This method of creating the screen is deprecated starting with version 2.0.8 for Jira 5 and 2.6.1 for Jira 6. New input types added in versions 2.0.8+ and 2.6.1+ will not work using this method.
Scroll down to see thenew-method.

The script must return an array of strings, containing parameters for each field that should be displayed. The array will be built from concatenated sub-lists, each of which will describe a field to be shown on the screen. However, if the script does not return a value or the value is empty, no screen will be shown.

To help create the string array that needs to be returned, we have created some app-specific SIL routines with a user-friendly syntax that will return a sub-list for each field.

...

label : string

defaultValue: string

isDisabled : boolean

...

label : string

defaultValue: string

isDisabled : boolean

rows: number. An optional parameter to specify how tall the text area should be, in lines.
If not specified, the default will be "3".

...

BA_createSingleCheckbox(label, isSelected, isDisabled)

...

label : string

isSelected: boolean

isDisabled : boolean

...

label: string

isDisabled : boolean

...

label : string

options: string []

defaultValue: string (must match one of the options or empty string)

isDisabled : boolean

...

label : string

options: string []

defaults: string [] (must match some of the options or empty array)

isDisabled : boolean

...

Note
titleNote

Be sure to gather all sub-lists into a single array and return it at the end of the script.

Examples (up to v2.0.7 for Jira 5 and 2.6.0 for Jira 6)

Examples

Example Screen Script
Code Block
boolean isDisabled = false;

...

boolean isRequired = 

...

The above script will create one input of each type on the following screen.

Image Removed

Examples (v2.0.8+ for Jira 5 and 2.6.1+ for Jira 6)

...

titleExample screen script

...

true;
string badesc = "This is a description";

//Content
BA_createHtmlContent("<h1>HTML Title Text</h1>");
BA_createWikiContent("h2. Wiki Subtitle - TEST-2 Cool :D");

//No options, single value
BA_createInput("input", "asdf", isDisabled, isRequired, badesc);
BA_createTextArea("ta", "some text", isDisabled, 3, isRequired, badesc);
BA_createSingleCheckbox("cbx", true, isDisabled, isRequired, badesc);
date d = currentDate();
BA_createDatePicker("date", d, isDisabled, isRequired, badesc);
BA_createDateTimePicker("datetime", d, isDisabled, isRequired, badesc);
BA_createUserPicker("userpicker", "admin", isDisabled, isRequired, badesc);

//No options, multiple values
BA_createFileUpload("File Upload", isDisabled, isRequired, badesc);

//Multiple options, one selectable value
BA_

...

createSelectList("

...

Select List", {"a", "b

...

"

...

}, 

...

"a

...

"

...

, isDisabled, isRequired, badesc);
BA_createRadioGroup("

...

Radio Group", {"a", "b"}, "a", isDisabled, isRequired, badesc);

...


//Multiple options, multiple selectable values
BA_createMultiSelectList("Multi Select List", {"a", "b", "c"}, {"a"

...

,

...

 

...

"

...

b"}, 

...

isDisabled, isRequired, badesc);
BA_

...

createCheckboxGroup("

...

Checkbox Group", 

...

{"a", "b", "c"}, {"a", "b"}, isDisabled, isRequired, badesc);

BA_setActionTitle("

...

Multiple 

...

options, 

...

multiple 

...

selectable 

...

values");
BA_setExecuteButtonText("

...

Example");

...

 

Contents

Table of Contents
excludeSee also

...

See More

Child pages (Children Display)
pageConfiguring a Power Actions Custom Field