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.
Hi everyone! My name’s Matt and I’m a product manager at Atlassian. I work in the navigation & findability space for all our Jira Cloud products. We’ve been working on trying to improve the exp...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events