Workflow validator doesn't work on approval step transitions in JSM Cloud
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Learn why workflow transition validators included in an approval step are not applied. The approver can approve or decline the request even if the required field is empty.
Solution
Approval steps bypass workflow validators
Approval steps bypass workflow transitions. This is an expected behavior, and there is a feature request to improve this:
Work around this limitation
As of now, it won't be possible to enforce the validator on the same transition as the approval step.
As a workaround, use two transitions instead: one to validate the required fields, and another transition with the Approval step.
Since the same validator can't apply to the approval transition itself, decide up front which of the two new transitions should carry the mandatory fields check: if the fields must be filled in before the request reaches an approver, put the validator on the transition into the approval step; if they only matter once approved, put it on the transition out of the approval step.
After splitting the transitions, test the workflow end-to-end as both a requester and an approver to confirm the validator now blocks progress at the intended step, and that approvers can still approve/decline without being blocked by fields that aren't relevant to their step.
Was this helpful?