Skip to content

Commit

Permalink
Update ProjectConfigurationSettingsController.java
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-richardson committed Nov 19, 2023
1 parent a38452c commit a262588
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.octopus.teamcity.opentelemetry.server.endpoints.OTELEndpointFactory;
import jetbrains.buildServer.controllers.ActionErrors;
import jetbrains.buildServer.controllers.ActionMessages;
import jetbrains.buildServer.controllers.BaseFormXmlController;
import jetbrains.buildServer.controllers.SimpleView;
import jetbrains.buildServer.serverSide.*;
Expand Down Expand Up @@ -63,7 +64,7 @@ protected void doPost(@NotNull HttpServletRequest request, @NotNull HttpServletR
if (!feature.isEmpty()) {
project.removeFeature(feature.stream().findFirst().get().getId());
project.persist();
getOrCreateMessages(request).addMessage("featureReset", "Feature was reset to the inherited settings.");
ActionMessages.getOrCreateMessages(request).addMessage("featureReset", "Feature was reset to the inherited settings.");
} else {
LOG.warn(String.format("Got a request to reset settings, but the settings didn't exist on project %s?", project.getProjectId()));
}
Expand All @@ -77,8 +78,7 @@ protected void doPost(@NotNull HttpServletRequest request, @NotNull HttpServletR

project.persist();

//todo: figure out how to get these messages to show in the ui.
getOrCreateMessages(request).addMessage("featureUpdated", "Feature was updated.");
ActionMessages.getOrCreateMessages(request).addMessage("featureUpdated", "Feature was updated.");
}
}

Expand Down

0 comments on commit a262588

Please sign in to comment.