CLI Post Function and CLI Validator
Workflow functions
CLI action (validator) - check information from a CLI action before allowing a transition
CLI action (post-function) - run a CLI action after the transition has completed
Both share similar parameters and capabilities.
Related documentation
Action Reference - find product specific actions that you can run as part of the transition
Usage
Administrator authority is required to add or update workflow actions. This is required to use Run CLI Actions in Jira.
Create a draft workflow
Edit the workflow
Find the workflow step
Select Validators or Post Functions tab
Select Add
Find and select CLI action
Parameter input dialog
CLI action validators and post functions share the same parameters.
Field | Description |
|---|---|
Condition 1 | Conditions determine whether or not the CLI action should be run.
Value, regex pattern for matching, and pattern options. |
Condition 2 | Another condition. Both conditions must be successful to proceed to run the CLI action |
Product | Select the Atlassian product to be accessed
|
Action | Provide an action string valid for the product selected - same as what you would do from a command line |
Data | Some CLI actions can input data from standard input or using the file parameter and this allows the input data to be provided directly
|
CLI find pattern 1 | A regex pattern that is used to find data on the result produced by running the CLI action
|
CLI find pattern 2 | A second regex pattern similar to find pattern1
|
Message | Validator error message and workflow property value
|
Notes | This provides administrators an opportunity to better document this workflow function |
Variable substitution
A variety of substitution variables are available to use in text parameters.
Category | Variables | Where Used | Discussion |
|---|---|---|---|
Issue special values | %issue_key% %issue_summary% %issue_description% %issue_affected_versions% %issue_fixed_versions% %project% | Action, Data, Message |
|
Parent issue special values | %parent_key% %parent_summary% %parent_description% %parent_affected_versions% %parent_fixed_versions% | Action, Data, Message | Only available if issue is a subtask |
Issue field values | %fieldname% | Action, Data, Message | Any JIRA defined field name. Like summary, description, environment, issueType, priority, resolution, versions, fixVersions, components, duedate, reporter, assignee, timetracking, id |
Issue custom field values | %customfieldname% | Action, Data, Message | Issue specific custom field name |
CLI values | %base_url% %validator_message% %function_message% | Action, Data, Message | URL of this JIRA instance - useful for local JIRA actions Message field from last run CLI action validator Message field from last run CLI post function |
Action result | %cli_message% | Message | Result message from running the CLI action |
Pattern replacements | %pattern1_n% %pattern2_n% | Message | Regex group value from evaluating find pattern1 or pattern2. n represents the regex group number (1, 2, ...) - equivalent of $n substitution in other regex based usage. |
