Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=Post+Functions+-+Example+2+-+15487143
widthauto

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");