🚀 JWT 3.0 is out 🚀 

The app was completely overhauled, and so was the documentation: Jira Workflow Toolbox (Server/Data Center) Home

The page you are viewing is still valid for all app versions prior to 3.0.

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

Compare with Current View Page History

« Previous Version 5 Current »

On this page


Example: Validation on MIME types of issue attachments

You may also find useful knowing that you can also validate the type of files attached.

Let's suppose we want to validate that our issue has the following files attached:

  • At least 1 .jar file.

  • At least 3 images (any format).

  • No more than 5 .txt file

  • Exactly 1 XML file.


To implement this validation we will use Boolean validator with math, date-time or text-string terms with the following configuration:


Boolean expression used is: matches(%{00072}, "(.*application/java-archive.*){1,}") AND matches(%{00072}, "(.*text/plain.*){0,5}") AND matches(%{00072}, "(.*text/xml.*){1}") AND matches(%{00072}, "(.*image/.*){3,}")


Note that:

  •  %{00072} is field code for "Attachments with details"


To design this configuration, I have previously used Copy a parsed text to a field post-function in order to see the value that field "Attachments with details" takes when I attach different file types. Then it's easy to write a regular expressions for matching desired values.



Other examples of that function

Related Usage Examples