Skip to end of banner
Go to start of banner

getInput

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Availability

This routine is available starting with katl-commons 4.0.16

Syntax

getInput(customfield_id)
or
getInput(keyword)

 

Make sure that a transition screen has been attached to the current transition.

Description

Gets the value of a field in the transition screen. Should only be used in transitions that require a screen.

  

This routine has a very limited working scope. Since it handles transient values, it will work correct only if an interval is called starting from the moment the user clicks the Submit button on the transition screen up to the point when the issue is saved in the database. Therefore we can define the valid scope for the routine to be validators and certain post functions. It means that you will not be able to use it in conditions, SIL services, SIL listeners nor from the SIL Gadget.

While using in post functions this routine will work in SIL post functions that run before the routines that save the issue in the database. The latter are default Jira post functions that can be easily recognized by their name, for instance "Update change history for an issue and store the issue in the database", for a regular transition "Creates the issue originally", for the "Create Issue" transition, and so on.

Parameters

Parameter name

Type

Required

Description

customfield_id/keyword

string

Yes

Id of the custom field (customfield_id) or the specific keyword for the standard fields.

Return type

string

The value of the field in the transition screen.

Examples

Example 1 - checking whether a certain custom field has any value

getInput("customfield_12003");

Returns the value set in the transition screen for customfield_12003.

Example 2 - checking whether a ticket has comments

getInput("comment");

Returns the value the Comment field has set.

Notes

Custom fields must be referenced by id (customfield_id), while standard fields can be specified by one of the following keywords: summary, timetracking, security, attachment, reporter, environment, description, duedate. You can also check the Comment field, using the keyword comment.

See also

  • No labels