Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

hasInput(customfield_id)

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue
Verifies if a field had input in the transition screen.

Verifies if a field had input in the transition screen. Should only be used in transitions that require a screen.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

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

Boolean

A "true" return value means that the specified field had input in the transition screen.

Examples

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

Code Block
hasInput("customfield_12003");

Returns "true" if the customfield_12003 contains a value and "false" if the customfield_12003 is empty.

Example 2 - checking whether a ticket has comments

Code Block
hasInput("comment");

Returns "true" if the Comment field contains a value and "false" if the Comment field is empty.

Example 3 - checking whether time was logged against a ticket

The following line will check whether a Time Spent field was filled out for a ticket during the transition (on the transition screen). This is useful for cases when you want to make sure that users log time when they resolve tickets.

Code Block
hasInput("worklog");

If you want to show a warning under the Time Spent field for cases when the worklog wasn't entered for a ticket, consider using the following lines in the Customizing workflows.
In addition you can use the isNull routine to check whether the time was logged against the ticket before the transition.

Code Block
return false, "worklog_timeLogged", "<error message>";

Note

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.
The timetracking fields have different internal naming in this case, so you'll have to use the next mapping:

FieldKey
estimatetimetracking_originalestimate
originalEstimatetimetracking_remainingestimate
worklog start dateworklog_startDate
worklog time loggedworklog_timeLogged

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "customfield_routine" and space = currentSpace ( )
labelsarray_routines