Hello Team,
case - i have 30 fields and i have to make sure when issue moves from "In progress" to "Done" status, if any of the field then system will not allow transition and show an error message that field is empty.
i tried workflow validators but it only show static message, unless i put validator for individual field.
similar case with workflow validator using script runner, message will be static and within same pop up box message comes with concatenated.
Last option is using Script runner behaviour, but my not getting why how to add condition for specific transition in scriptrunner. I am using Jira cloud, so usual documentation is not much help.
please let me know if anyone has tried it before and does it work? or what i can do?
Yes, you can handle this with Behaviours on Jira Cloud now. Behaviours were extended to work on transition screens, which is ideal for your case. You can scope the Behaviour to your project and use a simple condition so it only applies when moving In Progress → Done by checking the transition context (sourceStepName/destinationStepName) and using .setRequired(true) for each field.
For reference, Adaptavist has an official Behaviour example for Cloud that demonstrates how to make a field required based on another field’s value – the same logic applies here, just replace the condition with your transition context:
This approach gives you proper inline validation (red asterisks and field-level errors) instead of the static messages you get with workflow validators.
Kind Regards
Utkarsh
hi Utkarsh,
thank you for your reply. Yes i saw it and i tired to implement using script give here- https://docs.adaptavist.com/sr4jc/latest/features/behaviours/create-and-modify-behaviours
you can take transition ID like this below and add set required condition.
const transitionToDone = 41;
i even tried by adding transition screen but it did not work for me.
also i am not sure or saw at least function to get from and to status like you mentioned - (sourceStepName/destinationStepName)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.