<ac:structured-macro ac:name="table-plus" ac:schema-version="1" data-layout="default">
<ac:parameter ac:name="applyColStyleToCell">true</ac:parameter>
<ac:parameter ac:name="heading">0</ac:parameter>
<ac:parameter ac:name="columnTypes">s,s,s,s</ac:parameter>
<ac:parameter ac:name="multiple">false</ac:parameter>
<ac:parameter ac:name="columnAttributes">style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,</ac:parameter>
<ac:parameter ac:name="enableSorting">false</ac:parameter>
<ac:rich-text-body>
<table data-layout="default">
<colgroup>
<col style="width: 76.0px;" />
<col style="width: 278.0px;" />
<col style="width: 106.0px;" />
<col style="width: 266.0px;" />
</colgroup>
<tbody>
<tr>
<td>
<p><strong>Syntax</strong></p>
</td>
<td>
<p>hasInput(customfield_id)</p>
</td>
<td>
<p><strong>Package</strong></p>
</td>
<td>
<p></p>
</td>
</tr>
<tr>
<td>
<p><strong>Alias</strong></p>
</td>
<td>
<p></p>
</td>
<td>
<p><strong>Pkg Usage</strong></p>
</td>
<td>
<p></p>
</td>
</tr>
</tbody>
</table>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:name="warning" ac:schema-version="1">
<ac:rich-text-body>
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 <strong>Submit</strong> 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 <strong>validators</strong> and certain<strong> post functions.</strong> It means that you will not be able to use it in conditions, SIL services, SIL listeners nor from the SIL Gadget.<br/>While using in post functions this routine will work in SIL post functions that run <strong>before</strong> 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.
</ac:rich-text-body>
</ac:structured-macro>
<h2>Description</h2>
<ac:structured-macro ac:name="excerpt" ac:schema-version="1" data-layout="default">
<ac:parameter ac:name="hidden">true</ac:parameter>
<ac:rich-text-body>
Verifies if a field had input in the transition screen.
</ac:rich-text-body>
</ac:structured-macro>
<p>Verifies if a field had input in the transition screen. Should only be used in transitions that require a screen.</p>
<h2>Parameters</h2>
<ac:structured-macro ac:name="table-plus" ac:schema-version="1" data-layout="default">
<ac:parameter ac:name="applyColStyleToCell">true</ac:parameter>
<ac:parameter ac:name="columnTypes">s,s,s,s</ac:parameter>
<ac:parameter ac:name="heading">0</ac:parameter>
<ac:parameter ac:name="multiple">false</ac:parameter>
<ac:parameter ac:name="enableSorting">false</ac:parameter>
<ac:rich-text-body>
<table data-layout="default">
<colgroup>
<col style="width: 170.0px;" />
<col style="width: 97.0px;" />
<col style="width: 108.0px;" />
<col style="width: 305.0px;" />
</colgroup>
<tbody>
<tr>
<th>
<p>Parameter name</p>
</th>
<th>
<p>Type</p>
</th>
<th>
<p>Required</p>
</th>
<th>
<p>Description</p>
</th>
</tr>
<tr>
<td>
<p>customfield_id/keyword</p>
</td>
<td>
<p>String</p>
</td>
<td>
<p>Yes</p>
</td>
<td>
<p>Id of the custom field (customfield_id) or the specific keyword for the standard fields.</p>
</td>
</tr>
</tbody></table>
</ac:rich-text-body>
</ac:structured-macro>
<h2>Return Type</h2>
<p><strong>Boolean</strong></p>
<p>A "true" return value means that the specified field had input in the transition screen.</p>
<h2>Examples</h2>
<h3>Example 1 - checking whether a certain custom field has any value</h3>
<ac:structured-macro ac:name="code" ac:schema-version="1">
<ac:plain-text-body>
<![CDATAhasInput("customfield_12003");]>
</ac:plain-text-body>
</ac:structured-macro>
<p>Returns "true" if the customfield_12003 contains a value and "false" if the customfield_12003 is empty.</p>
<h3>Example 2 - checking whether a ticket has comments</h3>
<ac:structured-macro ac:name="code" ac:schema-version="1">
<ac:plain-text-body>
<![CDATAhasInput("comment");]>
</ac:plain-text-body>
</ac:structured-macro>
<p>Returns "true" if the <strong>Comment</strong> field contains a value and "false" if the <strong>Comment</strong> field is empty.</p>
<h3>Example 3 - checking whether time was logged against a ticket</h3>
<p>The following line will check whether a <strong>Time Spent</strong> 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.</p>
<ac:structured-macro ac:name="code" ac:schema-version="1">
<ac:plain-text-body>
<![CDATAhasInput("worklog");]>
</ac:plain-text-body>
</ac:structured-macro>
<p>If you want to show a warning under the <strong>Time Spent</strong> field for cases when the worklog wasn't entered for a ticket, consider using the following lines in the <ac:link><ri:page ri:space-key="JJUPIN" ri:content-title="Customizing workflows"/><ac:plain-text-link-body>workflow validator</ac:plain-text-link-body></ac:link>.<br/>In addition you can use the <ac:link><ri:page ri:content-title="isNull"/><ac:plain-text-link-body>isNull(timeSpent)</ac:plain-text-link-body></ac:link> routine to check whether the time was logged against the ticket <strong>before</strong> the transition.</p>
<ac:structured-macro ac:name="code" ac:schema-version="1">
<ac:plain-text-body>
<![CDATAreturn false, "worklog_timeLogged", "<error message>";]>
</ac:plain-text-body>
</ac:structured-macro>
<p><ac:structured-macro ac:name="note" ac:schema-version="1">
<ac:rich-text-body>
<p>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 <strong>Comment</strong> field, using the keyword comment.<br/>The <strong>timetracking</strong> fields have different internal naming in this case, so you'll have to use the next mapping:<table><tbody><tr><th>Field</th><th>Key</th></tr><tr><td>estimate</td><td>timetracking_originalestimate</td></tr><tr><td>originalEstimate</td><td>timetracking_remainingestimate</td></tr><tr><td>worklog start date</td><td>worklog_startDate</td></tr><tr><td>worklog time logged</td><td>worklog_timeLogged</td></tr></tbody></table></p>
</ac:rich-text-body>
</ac:structured-macro></p>
<h2>See also</h2>
<p><ac:structured-macro ac:name="contentbylabel" ac:schema-version="4" data-layout="default">
<ac:parameter ac:name="showLabels">false</ac:parameter>
<ac:parameter ac:name="max">25</ac:parameter>
<ac:parameter ac:name="showSpace">false</ac:parameter>
<ac:parameter ac:name="cql">label = "customfield_routine" and space = currentSpace ( )</ac:parameter>
<ac:parameter ac:name="labels">array_routines</ac:parameter>
</ac:structured-macro></p>