Forgotten Attachment
This workflow reminds users to add an attachment to an issue if an attachment is mentioned in a description or comment.
File Name | jetbrains-youtrack-forgottenAttachment |
---|---|
Auto-attached | no |
Rules | Attachment reminder (stateless) |
Use Case
This workflow helps to make sure that users remember to attach a file to an issue when they reference an attachment in a description or comment.
Rules
This rule scans the description and comment for references to an attachment. If a reference is found, the user is reminded to attach a file to the issue.
Attachment reminder
rule Attachment reminder
when description.changed || comments.added.isNotEmpty {
var text = " ";
if (description.changed) {
text = description;
} else if (comments.added.isNotEmpty) {
text = comments.added.first.text;
}
var attachString = l10n ( attachments, attachment, attached, attaches, attach, attaching );
for each attachWord in attachString.split(", ", opts){
if (text.contains(attachWord, ignoreCase)){
message(l10n ( You have mentioned the ' {attachWord}' word, don't forget to attach it (them). ));
break;
}
}
}
Last modified: 7 March 2019