string errorMsg = "You must enter a comment!";
if(!hasInput("comment")) {
return false, "comment", errorMsg;
}
Info
Because the second parameter (optional) was used in this example the error message will also display beneath the comment field.
Info
When using transition screens be sure to use routines that can read screen values like hasInput() or getInput() otherwise the script will retrieve the value (if any) stored in the issues and not the value the user just input into the field and is trying to save.
createIssue(project, key, "Sub-task", "This is the summary");