Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
UI Text Box
sizemedium
typeinfo

Use case

Return the mimetypesĀ of theĀ attachments.

Expression

Create and configure aĀ Smart fieldĀ using this expression inĀ Jira expressionĀ parsing mode:

Code Block
languagejs
linenumberstrue
issue?.attachments?.reduce((result,att) => 
                result.set(att.mimeType,""),
            new Map()).entries().flatten().filter(entry => entry != "")


Page properties
hiddentrue
Feature

Field typeSmart text field
Parsing mode

Jira expression

Expression
Code Block
languagejs
linenumberstrue
issue?.attachments?.reduce((result,att) => 
                result.set(att.mimeType,""),
            new Map()).entries().flatten().filter(entry => entry != "")
Label
Use case description

Return the mimetypesĀ of theĀ attachments.

Complexity

Status
colourGreen
titleBeginner