Use case
Validate that an issue has specific files attached.
In this use case, we want to validate that our issue has the following files attached:
-
At least one .jar file
-
At most five .txt files
-
Exactly one .xml file
-
At least three images (any format).
โ๏ธ Configuration
Add the Logical validator to the desired workflow transition.
Expression
Add the following expression:
matches(%{issue.attachments.details}, "(.*application/java-archive.*){1,}") AND matches(%{issue.attachments.details}, "(.*text/plain.*){0,5}") AND matches(%{issue.attachments.details}, "(.*text/xml.*){1}") AND matches(%{issue.attachments.details}, "(.*image/.*){3,}")
Expression in detail:
|
Files |
Expression |
|---|---|
|
At least 1 .jar file |
|
|
At most 5 .txt files |
|
|
Exactly 1 XML file |
|
|
At least 3 images |
|
๐ท Screenshots