The Search paired with the SLA is the most important part of the SLA.
It is all about the search !
You decide when a SLA is On or Off for an issue by configuring the SLA search to match your needs.
You can use Saved Filters or JQL search strings.
Read more about searching for issues in JIRA (JIRA 7.3) https://confluence.atlassian.com/jiracoreserver073/searching-for-issues-861257157.html
The JIRA JQL language gives you a very flexible tool for searching, read this blog https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql (link alive May 8., 2017)
The SLA Time Spent is still increasing even in status closed?
You should add a clause to search like:
That way the issue will not be in scope of the SLA and the SLA will turn to state Off
I want the SLA Time Spent to stop increasing when in status "Waiting for Customer"
You can't use a SLA Search to pause the SLA. This is done manually at the issue view screen.
However, you can turn the SLA to Off by adding this clause to search:
AND status ! = "Waiting for Customer"
I want a SLA for bugs with priority Blocker
You want to make a search that only includes issues of type bugs and priority blocker
issuestatus = "Bug" AND priority = "Blocker"
SLA Time Spent should only increase when assigned to members of group "jira-developers"
Use the membersOf() function. When ever the issue is assigned to member of the group jira-developers the SLA will change to status On
AND assignee in membersOf("jira-developers")
SLA Time Spent should not increase when assigned to members of group "Customers"
Use the membersOf() function. When ever the issue is assigned to member of the group jCustomers the SLA will change to status Off
AND assignee not in membersOf("customers")