Requirement:
I tried using a ScriptRunner "Validate details using a Jira Expression" validator, but the validator fails with "Failed to load condition".
My questions:
Has anyone successfully implemented attachment filename validation during a transition in Jira Cloud?
For your specific scenario, where the attachment is uploaded during the same transition, I don't believe this is currently possible in Jira Cloud.
Workflow validators, including ScriptRunner Jira Expression validators, cannot reliably inspect the filename of an attachment that is being uploaded as part of the current transition, because the attachment is only available after the transition has been processed.
Similarly, Jira Automation isn't suitable for this requirement, as it runs after the transition completes, so it can react to the attachment but cannot prevent the transition.
If the attachment were already on the issue before the transition, then validating its filename would be a different scenario and could be handled by a validator. However, for attachments uploaded during the transition itself, a custom solution (such as a Forge workflow validator) is likely the only way to enforce this requirement before the transition is allowed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.