Documentation/Scripts/Script Argument Input Types
From ScriptRunner
Documentation :: Administration :: Script Argument Input Types
Providing good input sanitization for your scripts is critical for the safe running of them. Script Argument Input Types allow you to build custom rules for you script inputs to help ensure that user can only provide valid argument values to the scripts they're running.
ScriptRunner come with a number of ready made script argument types, users are encourage however to consider building their own additional input types for their own specific use cases.
Creating A Script Argument Input Type
- From the menu, select Script Management > Manage Script Argument Types.
- The Create Script Argument Type window should now be shown.

- Name: This is a friendly name to refer to this input type in other areas of ScriptRunner.
- Input Type: This selects the type of input box presented to the user when using this input type.
- text: Provides a standard single line text input box.
- date: Provides a selectable data input box.
- decimal: Provides an input box that only allows the input of numbers and a decimal.
- integer: Provides an input box that only allows the input of numbers.
- password: Provides the same as text input type, but masks the value on screen.
- textarea: Provides a multi-line text input box.
- time: Provides a formatted time input box.
- timestamp: Provides both date and time input types, and sends the combined value to your script when used.
- select: Provides a drop down selection of values that can be selected by a user.
- Enabled: Allows you to enable or disable the use of this input type.
- Filter Regex: This allows you to customise this input by providing a regex rule that if the users input matches at least once, will result in the users attempt to run that script being rejected.
- Script Argument List Values: This is only provided when the select input type is selected. Click
to open the Script Argument List Values window to provide a list of selectable options for users to select from.
- Name: This is the friendly name for the value users will see when running a script.
- Value: This is the value that is passed to scripts when run.
- Providing that Enabled was selected, this Script Argument Input Type will now be available for all users to add to any scripts in Manage Scripts .
Editing A Script Argument Input Type
- From the menu, select Script Management > Manage Script Argument Types.
- You should now see the Edit Script Argument Type window.

- Name: This is a friendly name to refer to this input type in other areas of ScriptRunner.
- Input Type: This selects the type of input box presented to the user when using this input type.
- text: Provides a standard single line text input box.
- date: Provides a selectable data input box.
- decimal: Provides an input box that only allows the input of numbers and a decimal.
- integer: Provides an input box that only allows the input of numbers.
- password: Provides the same as text input type, but masks the value on screen.
- textarea: Provides a multi-line text input box.
- time: Provides a formatted time input box.
- timestamp: Provides both date and time input types, and sends the combined value to your script when used.
- select: Provides a drop down selection of values that can be selected by a user.
- Enabled: Allows you to enable or disable the use of this input type. Scripts that use the selected Input Type will continue to work, but users will no longer be able to add this Input Type to scripts in Manage Scripts .
- Filter Regex: This allows you to customise this input by providing a regex rule that if the users input matches at least once, will result in the users attempt to run that script being rejected.
- Script Argument List Values: This is only provided when the select input type is selected. Click
to open the Script Argument List Values window to provide a list of selectable options for users to select from.
- Name: This is the friendly name for the value users will see when running a script.
- Value: This is the value that is passed to scripts when run.
- Changes to the Script Argument Input Type will be reflected immediately for all users upon saving.
Removing Script Argument Input Types
- From the menu, select Script Management > Manage Script Argument Types.
- Providing that the Script Argument Input Type is not currently used by any scripts, the Script Argument Input Type will now be deleted as should no longer been seen in the list displayed either on the Manage Script Arguments Types page, or when selecting input types in Manage Scripts. If the Script Argument Input Type was in use by a script, you will receive an error.
