Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
Code Block
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");