Yes you can but you will need an add-on to do that (like the JIRA ScriptRunner).
JIRA does not have a native functionality to close a sub task once the parent issue is closed.
Here's a sample from the ScriptRunner documentation on how to do what you want
https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions/auto-close-all-subtasks.html
We do have the JIRA ScriptRunner plugin.
There's now a very easy to configure way to transition parents and sub-tasks in sync using Automation for JIRA!
You can easily modify related issues (such as parents, stories, sub-tasks, epics, linked issues and even JQL) using our related issues action and condition:
(this example transitions sub-tasks to "In Progress", but you could change that to "Closed" very easily)
For more details see https://blog.codebarrel.io/synchronize-parent-and-sub-task-issues-with-automation-for-jira-bdcca6c9d453
It looks like you're new here. Sign in or register to get started.