This section describes a Forge preview feature. Preview features are deemed stable; however, they remain under active development and may be subject to shorter deprecation windows. Preview features are suitable for early adopters in production environments.
We release preview features so partners and developers can study, test, and integrate them prior to General Availability (GA). For more information, see Forge release phases: EAP, Preview, and GA.
The jira:actionValidator module lets developers define custom validation against specific Jira actions. Currently, the only supported way to provide this custom validation is by using Jira expressions.
| Property | Type | Required | Description |
|---|---|---|---|
key |
| Yes | A key for the module, which other modules can refer to. Must be unique within the manifest. Regex: |
action | string | Yes | The name of the action. Allowed actions are:
|
expression | string | Yes | The Jira expression that provides the custom validation logic. The expression should return a boolean value:
|
errorMessage | string | No | Error message to display when the validation fails due to Action validator. |
The jira:actionValidator module can be used against specific Jira actions.
This action will let app to execute custom validation when user tries to change work item type through issueView screen.
The following context variables are available in the validation expression:
user (User):
The user that wants to perform the action.issue (Issue):
The issue being modified.project (Project):
The project the issue belongs to.newIssueType (String): The new issue type ID that the work item is being changed to.This example shows manifest file of jira:actionValidator module for workItemTypeChanged action.
1 2modules: 'jira:actionValidator': - key: workitem-type-validator action: 'workItemTypeChanged' expression: 'issue.key=="HSP-1" && newIssueType=="1"' errorMessage: "Work Item type change was blocked by action validator."
The following limitations apply to apps that use the jira:actionValidator module:
One validator per action type: You can declare only one jira:actionValidator module per action type.
Compatible modules only: If an app declares a jira:actionValidator module, it can only declare the following additional module types:
jira:adminPage, jira:projectPage, jira:projectSettingsPage, jira:globalPage, jira:personalSettingsPagecore:function modulesModule count limit: Apps with jira:actionValidator modules can declare a maximum of two non-core modules in total (for example, one action validator + one additional non-core module). core:* modules don’t count toward this limit.
Rate this page: