*
* @param oldName the old name of the Gerrit server
*/
private void changeSelectedServerInJobs(String oldName) {
for (AbstractProject job : PluginImpl.getInstance().getConfiguredJobs(oldName)) {
GerritTrigger trigger = (GerritTrigger)job.getTrigger(GerritTrigger.class);
try {
trigger.setServerName(name);
trigger.start(job, false);
job.addTrigger(trigger);
job.save();
} catch (IOException e) {
logger.error("Error saving Gerrit Trigger configurations for job [" + job.getName()
+ "] after Gerrit server has been renamed from [" + oldName + "] to [" + name + "]");