Button handy |
---|
blank | true |
---|
color | #0052CC |
---|
name | Send Feedback |
---|
link | https://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=Ensure+that+issues+have+attachments+-+15482620 |
---|
width | auto |
---|
|
Html bobswift |
---|
<iframe width="560" height="315" src="https://www.youtube.com/embed/RwN8Sz5I_bA" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe> |
...
Use this script as a workflow transition validator to allow transition only if the issue has one or more attachments.
Code Block |
---|
string errorMsg = "At least one file must be attached to the issue.";
if(size(attachments) == 0) {
return false, errorMsg;
} |
Note |
---|
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. |