Last updated Nov 25, 2024

Jira workflow modules

This page describes how to migrate Jira workflow modules from Connect to the Forge.

As a prerequisite, refer to the parent page that contains a general guide on how to migrate Jira modules from Connect to Forge.

Configuration

The workflow modules configuration is stored within Jira. After migrating your Connect application's workflow conditions, validators or post functions modules to Forge, if the existing Connect workflow modules saved within Jira are detected, the corresponding Forge module will be executed instead, utilizing the parameters stored in the Connect configuration data.

Backward compatibility

Note that the underlying workflow configuration is not migrated. It is possible to switch back to the Connect during the development process.

All new Forge workflow modules added to workflows will be saved as Forge modules and will not be backward compatible. This also applies after the migrated module configuration has been updated in the workflow editor UI.

Forge manifest example

1
2
modules:
  jira:workflowCondition:
    - key: workflow-condition-summary-regexp
      name: Issue's summary matches a regexp
      description: Shows the transition only if the summary matches a configured regular
        expression.
      expression: issue.summary.match('.*' + config.regexp + '.*') != null
      view:
        resource: custom-ui-expression
      edit:
        resource: custom-ui-expression
      create:
        resource: custom-ui-expression
# ...
app:
  id: ari:cloud:ecosystem::app/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
  connect:
    key: connect-workflow-extensions-app
    remote: connect
# ...
connectModules:
#  jira:jiraWorkflowConditions:
#    - key: workflow-condition-summary-regexp
#      name:
#        value: Issue's summary matches a regexp
#      description:
#        value: >-
#          Shows the transition only if the summary matches a configured regular
#          expression.
#      expression: issue.summary.match('.*' + config.regexp + '.*') != null
#      view:
#        url: /view-condition?id={condition.id}&config={condition.config}
#      edit:
#        url: /edit?id={condition.id}&config={condition.config}
#      create:
#        url: /create

REST API

Although the Connect modules configuration is not migrated, the REST API will return the Forge version of the configuration.

GET {{baseUrl}}/rest/api/3/workflow/search?expand=transitions.rules

1
2
{
    "rules": {
        "conditionsTree": {
            "nodeType": "simple",
            "type": "ari:cloud:ecosystem::extension/245573a1-c721-4c79-b6e3-7715858ca5a3/66a303df-443e-4f76-a427-471c91372bb6/static/workflow-condition-summary-regexp",
            "configuration": {
                "value": "{\"regexp\":\"ready to start\"}",
                "id": "d0351465-8624-4dc8-98bc-74658bf4da7c"
            }
        }
    }
}

Limitations and differences

  • The Forge workflow validator, in addition to the Jira expression evaluation, can be implemented as a lambda function. The migration of Connect workflow validators to Forge must utilize the corresponding Forge Jira expression-based validator.
  • If your Connect workflow extension stored the configuration as a plain string, it will not be passed to the migrated module, because Forge workflow extensions accept only JSON objects. You can use REST API to update the configuration to the JSON.
  • The migration is not supported in the new workflow editor and experimental API at the moment. This means that the Connect modules will be visible instead of the Forge modules in new workflow editor, although the Connect modules also are not functional at this time. Additionally, only Connect modules are accessible from the experimental API.

Rate this page: