Hi I have this manifest:
modules:
jira:workflowValidator:
- key: my-workflow-validator-custom-ui
name: My Validator
description: A Jira workflow validator
# function: validate. # uncomment to use
expression: "'1' === '1'"
view:
resource: custom-ui
edit:
resource: custom-ui
create:
resource: custom-ui
function:
- key: validate
handler: index.handler
resources:
- key: custom-ui
path: static/custom-ui/build
permissions:
scopes:
- manage:jira-configuration
- read:jira-work
- read:issue:jira
- write:issue:jira
content:
styles:
- unsafe-inline
app:
runtime:
name: nodejs18.x
id: <myid>
I use manifest in this way, custom-ui appears as step when I add my-validator in workflow, but validation is always true for the expression that I put in manifest, now I want to have a api call in the validate function for my reasons (validation needs some jira api check to validate the trasnsition), so if I use function instead of expression, the api that I call in the validate function in my index works fine, BUT the custom-ui doesn’t appear anymore when I add my-validator in workflow.
Someone can help me?