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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's a sample from the ScriptRunner documentation on how to do what you want
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.