With this workflow post-function, you can ensure that issue has or not linked issues before to execute this transicion.
Add
validator
.Has Linked Issues Validator
from the list of validators.Add
to add the validator on the transition.Error Message – Set here the message you want to display o users when this validation fails