This option can be found on the Configuration -> E-mail Settings page under Automatic ticket closing. The amount of days the ticket will stay open in a selected state will be the time of all 3 intervals combined. This feature also allows you to automate up to 2 follow-up E-mails (if 'Send mail' is checked) if for example a user reply was expected. The timer will reset when a note is added.