Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

On this page

Table of Contents
maxLevel2
exclude(On this page|Use case).*
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

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

UI Steps


UI Step

Add the Logical validator to the desired workflow transition.


UI Step

Expression

Add the following expression:

Code Block
linenumberstrue
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:

FilesExpression
At least 1 .jar file


Code Block
linenumberstrue
matches(%{issue.attachments.details}, "(.*application/java-archive.*){1,}")


At most 5 .txt files


Code Block
linenumberstrue
matches(%{issue.attachments.details}, "(.*text/plain.*){0,5}")


Exactly 1 XML file


Code Block
linenumberstrue
matches(%{issue.attachments.details}, "(.*text/xml.*){1}")


At least 3 images


Code Block
linenumberstrue
matches(%{issue.attachments.details}, "(.*image/.*){3,}")






Screenshots


Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel = "use-case-workflow" and ancestor in ("27066629","32215720")


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Workflow functionLogical validator
Use case descriptionValidate that an issue has specific files attached.
Parser functionmatches()
Label

Status
colourRed
titleStaff

staff-

pick



Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged