I am looking to display the % Complete of an issue based on the number of child issues resolved and write that to a custom field so that I can display it in a Kanban Card.
I got it working using Jira Automation - setting up a rule to write a calculated value to a specific issue type on creation or update. See image below.
Is this the best way to do it or is it better to do something using ScriptRunner, possibly using a Listener and having that update the field?

Calculation in the Edit Issue fields is:
{{#=}}{{OpenIssues}} / {{TotalCount}} * 100{{/}}%