Skip to end of banner
Go to start of banner

Ensure that issues have attachments

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Use this script as a workflow transition validator to allow transition only if the issue has one or more attachments.

string errorMsg = "At least one file must be attached to the issue.";
if(size(attachments) == 0) {
   return false, errorMsg;
}

This script works only to check for the attachments that are already present for the current issue. If you need to check for attachments that are being added in the transition screen, please use !hasInput("attachments") instead of size(attachments) == 0.


  • No labels