Use case

Return the percentage of the completed child issues under an Epic, Story or Task. For Epics, the percentage of completed Stories and Tasks will be returned while for Stories and Tasks, the percentage of completed Sub-tasks will be returned.

Expression

Create and configure a Smart field using this expression in Jira expression mode:

let children = (issue.isEpic ? issue.stories : issue.subtasks);
children.length ? (children.filter(child => child.resolution).length / children.length * 100 + '').slice(0, 4) + '%' : ''