It is done using field configurations. See https://confluence.atlassian.com/adminjiracloud/specifying-field-behavior-776636443.html#Specifyingfieldbehavior-requirefield.
Edit: Just noticed that you want it mandatory only on certain transitions. In that case you have to use a workflow validator. You can use the "Fields Required" validator from JIRA Suite Utilities plugin.
You can use it during transition with the "Mandatory field validator" from Workfow Essentials. It also puts an asterisk * in front of the field.
Hello, Community! My name is Gosia and I'm a Product Manager on Jira Server and Data Center here at Atlassian. Since 2002 when we launched our public issue tracker, jira.atlass...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs