Server/DC versions of ScriptRunner allow scripts to be embedded into Jira automation rules. This should be implemented in Cloud as well.
The situation I am encountering that I can’t resolve within the existing automation rules is retrieving the highest value a field takes in a group of issues. Not a usual case, but one that has been requested to keep priorities between linked issues consistent.