Display conditions
Permissions
Translations

Usage with Jira modules

You can use display conditions for Jira modules that extend Jira UI to control their visibility. Depending on the module and where it's rendered, different conditions are available.

Global conditions

Global conditions check the state of the entire Jira instance for the current user regardless of the display context. They are available in all Jira modules that support display conditions.

ConditionTypeDescription
hasCoreAccessbooleanChecks if the current user has access to Jira
hasSoftwareAccessbooleanChecks if the current user has access Jira Software
hasServiceDeskAccessbooleanChecks if the current user has access to Jira Service Management
hasGlobalPermissionStringChecks if the current user has a global permission with the given key.

The following global permission keys are supported:
  • ADMINISTER
  • SYSTEM_ADMIN
  • USER_PICKER
  • CREATE_SHARED_OBJECTS
  • MANAGE_GROUP_FILTER_SUBSCRIPTIONS
  • BULK_CHANGE
  • CREATE_PROJECT
  • CREATE_CLASSIC_BUSINESS_PROJECT

Additionally, permissions from Forge and Connect apps can also be checked.

canAdministerJirabooleanChecks if the current user has the permission to administer the Jira instance.
hasAppAccessbooleanChecks if the current user is licensed to access your app.
appEditionStringChecks the installed app edition. Available values:
  • standard
  • advanced
entityPropertyExists
entityPropertyEqualTo
entityPropertyContainsAny
entityPropertyContainsAll
EntityProperty A set of entity property conditions available for the following entities:
  • app: properties of your app that can be set with the Set app property (Forge) REST API
  • user: properties of the current user
jiraExpressionStringChecks if the given Jira expression evaluates to true. The following context variables are available:
  • user (User): The current user
  • app (App): Your app

Issue view conditions

Issue view conditions are supported in modules that extend the issue view and will evaluate to false if used in other modules.

ConditionTypeDescription
issueKeyArray<string> or stringChecks if the key of the currently displayed issue matches any of the provided values.
issueIdArray<string> or stringChecks if the key of the currently displayed issue matches any of the provided values.
issueTypeArray<string> or stringChecks if the name of the type of the currently displayed issue matches any of the provided values.
hasIssuePermissionStringChecks if the current user has a project permission with the given key for the current issue.

The following project permission keys are supported: ADMINISTER_PROJECTS, BROWSE_PROJECTS, VIEW_DEV_TOOLS, VIEW_READONLY_WORKFLOW, CREATE_ISSUES, EDIT_ISSUES, TRANSITION_ISSUES, SCHEDULE_ISSUES, MOVE_ISSUES, ASSIGN_ISSUES, ASSIGNABLE_USER, RESOLVE_ISSUES, CLOSE_ISSUES, MODIFY_REPORTER, DELETE_ISSUES, ARCHIVE_ISSUES, UNARCHIVE_ISSUES, LINK_ISSUES, SET_ISSUE_SECURITY, VIEW_VOTERS_AND_WATCHERS, MANAGE_WATCHERS, ADD_COMMENTS, EDIT_ALL_COMMENTS, EDIT_OWN_COMMENTS, DELETE_ALL_COMMENTS, DELETE_OWN_COMMENTS, CREATE_ATTACHMENTS, DELETE_ALL_ATTACHMENTS, DELETE_OWN_ATTACHMENTS, WORK_ON_ISSUES, EDIT_OWN_WORKLOGS, EDIT_ALL_WORKLOGS, DELETE_OWN_WORKLOGS, DELETE_ALL_WORKLOGS, EDIT_WORKFLOW, EDIT_ISSUE_LAYOUT

Additionally, permissions from Forge and Connect apps can also be checked.

entityPropertyExists
entityPropertyEqualTo
entityPropertyContainsAny
entityPropertyContainsAll
EntityProperty A set of entity property conditions available for the following entities:
  • app: properties of your app that can be set with the Set app property (Forge) REST API
  • user: properties of the current user
  • issue: properties of the current issue
  • issueType: properties of the issue type of the current issue
  • project: properties of the project of the current issue
jiraExpressionStringChecks if the given Jira expression evaluates to true. The following context variables are available:
  • user (User): The current user
  • app (App): Your app
  • issue (Issue): The current issue
  • project (Project): The project of the current issue

Project view conditions

Project view conditions are evaluated against the current project (or the project of the current issue). They are available for modules that render in context of an issue or project and will evaluate to false if used in other modules.

ConditionTypeDescription
projectKeyArray<string> or stringChecks if the key of the project of the currently displayed issue matches any of the provided values.
projectIdArray<string> or stringChecks if the ID of the project of the currently displayed issue matches any of the provided values.
projectNameArray<string> or stringChecks if the names of the project of the currently displayed issue matches any of the provided values.
projectTypeArray<string> or stringChecks if the type of the project of the currently displayed issue matches any of the provided values. Available types are:
  • business
  • software
  • product_discovery
  • service_desk
  • customer_service
  • ops
isProjectArchivedbooleanChecks if the current project is archived
hasProjectPermissionStringChecks if the current user has a project permission with the given key in the current project (or the project of the current issue).

The following project permission keys are supported: ADMINISTER_PROJECTS, BROWSE_PROJECTS, VIEW_DEV_TOOLS, VIEW_READONLY_WORKFLOW, CREATE_ISSUES, EDIT_ISSUES, TRANSITION_ISSUES, SCHEDULE_ISSUES, MOVE_ISSUES, ASSIGN_ISSUES, ASSIGNABLE_USER, RESOLVE_ISSUES, CLOSE_ISSUES, MODIFY_REPORTER, DELETE_ISSUES, ARCHIVE_ISSUES, UNARCHIVE_ISSUES, LINK_ISSUES, SET_ISSUE_SECURITY, VIEW_VOTERS_AND_WATCHERS, MANAGE_WATCHERS, ADD_COMMENTS, EDIT_ALL_COMMENTS, EDIT_OWN_COMMENTS, DELETE_ALL_COMMENTS, DELETE_OWN_COMMENTS, CREATE_ATTACHMENTS, DELETE_ALL_ATTACHMENTS, DELETE_OWN_ATTACHMENTS, WORK_ON_ISSUES, EDIT_OWN_WORKLOGS, EDIT_ALL_WORKLOGS, DELETE_OWN_WORKLOGS, DELETE_ALL_WORKLOGS, EDIT_WORKFLOW, EDIT_ISSUE_LAYOUT

Additionally, permissions from Forge and Connect apps can also be checked.

entityPropertyExists
entityPropertyEqualTo
entityPropertyContainsAny
entityPropertyContainsAll
EntityProperty A set of entity property conditions available for the following entities:
  • app: properties of your app that can be set with the Set app property (Forge) REST API
  • user: properties of the current user
  • project: properties of the current project
jiraExpressionStringChecks if the given Jira expression evaluates to true. The following context variables are available:
  • user (User): The current user
  • app (App): Your app
  • project (Project): The current project

Project permission conditions

These conditions check project permissions of the current user against the issue (for issue view modules) or project (for project view modules). They are simpler versions of hasIssuePermission and hasProjectPermission documented in issue view and project view conditions respectively. They will evaluate to false for modules that aren't rendered in context of an issue or project.

ConditionTypeDescription
isProjectAdmin / canAdministerProjectsbooleanChecks if the current user has the permission to administer the current project.
canAddCommentsbooleanChecks if the current user has the permission to add issue comments.
canAssignIssuesbooleanChecks if the current user has the permission to assign issues.
canBeAssignedToIssuesbooleanChecks if the current user may be assigned to issues.
canCloneIssuesbooleanChecks if the current user has the permission to clone issues.
canCreateAttachmentsbooleanChecks if the current user has the permission to create issue attachments.
canCreateChildrenbooleanChecks if the current user has the permission to create children issues.
canCreateSubtasksbooleanChecks if the current user has the permission to create subtasks, which means that:
  • the user has the create subtasks permission
  • subtasks creation is enabled on the instance
  • the project has subtask issue types
canDeleteAllAttachmentsbooleanChecks if the current user has the permission to delete all issue attachments.
canDeleteAllCommentsbooleanChecks if the current user has the permission to delete all issue comments.
canDeleteAllWorklogsbooleanChecks if the current user has the permission to delete all worklogs.
canDeleteIssuesbooleanChecks if the current user has the permission to delete issues.
canDeleteOwnAttachmentsbooleanChecks if the current user has the permission to delete their own issue attachments.
canDeleteOwnCommentsbooleanChecks if the current user has the permission to delete their own comments.
canDeleteOwnWorklogsbooleanChecks if the current user has the permission to delete their own worklogs.
canEditAllCommentsbooleanChecks if the current user has the permission to edit all comments.
canEditAllWorklogsbooleanChecks if the current user has the permission to edit all worklogs.
canEditIssuesbooleanChecks if the current user has the permission to edit issues.
canEditOwnCommentsbooleanChecks if the current user has the permission to edit their own comments.
canEditOwnWorklogsbooleanChecks if the current user has the permission to edit their own worklogs.
canLinkIssuesbooleanChecks if the current user has the permission to link issues.
canLogWorkbooleanChecks if the current user has the permission to log work.
canManageWatchersbooleanChecks if the current user has the permission to add and remove watchers.
canModifyReportersbooleanChecks if the current user has the permission to change the issue reporter.
canMoveIssuesbooleanChecks if the current user has the permission to move issues from the current project.
canScheduleIssuesbooleanChecks if the current user has the permission to schedule issues.
canBrowseUsersbooleanChecks if the current user has the permission to browse users.
canViewDevToolsbooleanChecks if the current user has the permission to view dev tools.
canViewWatchersbooleanChecks if the current user has the permission to view watches.

Time tracking conditions

These conditions are designed to be used in combination with the time tracking provider module.

For example:

1
2
modules:
  jira:timeTrackingProvider:
    - key: my-time-tracking
      name: Forge time tracking provider
      # time tracking provider specific properties
  jira:issuePanel:
    - key: forge-time-tracking-issue-panel
      title: Panel to show if our time tracking is used
      displayConditions:
        timeTrackingProviderEnabled:
          key: my-time-tracking
    - key: jira-time-tracking-issue-panel
      title: Panel to show if native Jira time tracking is used
      displayConditions:
        jiraTimeTrackingProviderEnabled: true
ConditionTypeDescription
jiraTimeTrackingProviderEnabledbooleanChecks if the standard Jira time tracking provider is used (as opposed to custom time tracking provided by apps).
timeTrackingProviderEnabledStringChecks if the instance uses the given time tracking provider identified by the key of its module as defined in the manifest.

Jira Service Management conditions

Conditions related to Jira Service Management.

ConditionTypeDescription
hasServiceDeskAccessbooleanChecks if the current user has access to Jira Service Management.
canUseServiceManagementAgentFeaturesbooleanChecks if the current user is an agent in the current Jira Service Management project. Returns false if the extension isn't rendered in context of an issue or project.

Rate this page: