session.setAttribute(SESSION_TRIGGER_MONITOR, monitor);
logger.trace("Calling to index the search result.");
HashMap<String, JSONObject> indexed = indexResult(result);
logger.debug("Creating and triggering events.");
for (String rowId : selectedRows) {
ManualPatchsetCreated event = findAndCreatePatchSetEvent(rowId, indexed);
logger.debug("Created event: {}", event);
if (event != null) {
if (event.getProvider() == null || event.getProvider().getName() == null) {
event.setProvider(createProviderFromGerritServer(selectedServer));
}
monitor.add(event);
logger.trace("Triggering event: {}", event);
triggerEvent(event);
}