}
// Get a search request service to use for searching
final ComponentManager componentManager = ComponentManager.getInstance();
final SearchService searchService = componentManager.getSearchService();
final ProjectManager projectManager = componentManager.getProjectManager();
final IssueTypeSchemeManager issueTypeSchemeManager = componentManager.getIssueTypeSchemeManager();
final EventTypeManager eventTypeManager = componentManager.getEventTypeManager();
final CustomFieldManager customFieldManager = componentManager.getCustomFieldManager();
initialiseEventTypeIds(eventTypeManager);
// create service context to execute search with
JiraServiceContextImpl jiraServiceContextImpl = new JiraServiceContextImpl(user);
final CustomField securityLevel = customFieldManager.getCustomFieldObjectByName(SECURITY_LEVEL);
final CustomField dateResolved = customFieldManager.getCustomFieldObjectByName(DATE_RESOLVED);
final CustomField dateResponded = customFieldManager.getCustomFieldObjectByName(DATE_RESPONDED);
final CustomField slaLastCalculated = customFieldManager.getCustomFieldObjectByName(SLA_LAST_CALCULATED);
final CustomField responseSlaState = customFieldManager.getCustomFieldObjectByName(RESPONSE_SLA_STATE);
final CustomField fixSlaState = customFieldManager.getCustomFieldObjectByName(FIX_KPI_STATE);
final CustomField timeElapsed = customFieldManager.getCustomFieldObjectByName(TIME_ELAPSED);
final CustomField onHold = customFieldManager.getCustomFieldObjectByName(ON_HOLD);
// final CustomField incidentPriority = customFieldManager.getCustomFieldObjectByName(INCIDENT_PRIORITY);
final Iterator iterator = clientSLAConfigurations.iterator();
while (iterator.hasNext()) {
final ClientSLAConfig clientSLAConfig = (ClientSLAConfig) iterator.next();
//**
// log.debug("processing slas for client: "+clientSLAConfig.getClientName());
final String clientName = clientSLAConfig.getClientName();
final String[] projects = clientSLAConfig.getProjects();
Collection<Long> projectCollection = new HashSet<Long>();
Collection<String> issueTypeCollection = new HashSet<String>();
for (int i = 0; i < projects.length; i++) {
final String projectName = projects[i] == null ? null : projects[i].trim();
//**
// log.debug("Found project name " + projectName);
if (projectName != null) {
final Project project = projectManager.getProjectObjByName(projectName);
projectCollection.add(project.getId());
final String id = getIncidentIssueId(issueTypeSchemeManager, project);
if (id != null) {
issueTypeCollection.add(id);
}