Jira Expressions - Text
Overviewβ
| "Jira Expressions - Text" allows you to create calculated custom fields using Jira Expressions. To create and configure this field, refer to the native Jira Custom Fields page. |
|---|
Jira expressions syntaxβ
To retrieve the priority of an issue's parent using Jira Expressions, use the following:
issue.parent?.priority?.name
Explanation:
issue.parent: Accesses the parent issue of the current issue.β?.: The optional chaining operator ensures that if parent is null or undefined (i.e., the issue has no parent), the expression will return null instead of causing an error.β.priority: Accesses the priority field of the parent issue.β.name: Retrieves the name of the priority (e.g., "High", "Medium", "Low").
Global variablesβ
user: The current user. Equal to null if the request is anonymous.app: This Forge app that made the request or provided the module.issue: The current issue.project: The current project.
Examplesβ
Assignee's User Groupsβ
Lists all user groups that include the current issue's assignee as a member.
issue.assignee
? issue.assignee.groups.join(', ')
: [];
Attachment Contributorsβ
Identifies all users who have uploaded attachments to this issue.
issue.attachments?.length
? issue.attachments.map(attachment => attachment.author.displayName).join(', ')
: ''
Label Countβ
Shows the total number of labels currently applied to the issue.
issue.labels?.length ?? 0
Parent priorityβ
Retrieve the priority of an issue's parent
issue.parent?.priority?.name
info
Check out the 'Snippets' section in the app for more useful examples.