Skip to content

Commit 6f16305

Browse files
Merge pull request #5290 from microsoft/fixes-customer-survey
Fix status update issue for customer survey
2 parents d25abc7 + b1dc14a commit 6f16305

File tree

1 file changed

+5
-3
lines changed
  • PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/survey

1 file changed

+5
-3
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/survey/CustomerSurveyManager.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,12 @@ private void updateSurveyStatus(ICustomerSurvey survey, CustomerSurveyResponse r
114114
if (response == CustomerSurveyResponse.NEVER_SHOW_AGAIN) {
115115
customerSurveyConfiguration.setAcceptSurvey(false);
116116
} else {
117-
final int delay = response == CustomerSurveyResponse.ACCEPT ? TAKE_SURVEY_DELAY_BY_DAY : PUT_OFF_DELAY_BY_DAY;
118117
final CustomerSurveyConfiguration.CustomerSurveyStatus surveyStatus = getSurveyStatus(survey);
119-
surveyStatus.setSurveyTimes(surveyStatus.getSurveyTimes() + 1);
120-
surveyStatus.setLastSurveyDate(LocalDateTime.now());
118+
if (response == CustomerSurveyResponse.ACCEPT) {
119+
surveyStatus.setSurveyTimes(surveyStatus.getSurveyTimes() + 1);
120+
surveyStatus.setLastSurveyDate(LocalDateTime.now());
121+
}
122+
final int delay = response == CustomerSurveyResponse.ACCEPT ? TAKE_SURVEY_DELAY_BY_DAY : PUT_OFF_DELAY_BY_DAY;
121123
surveyStatus.setNextSurveyDate(LocalDateTime.now().plusDays(delay * 2));
122124
customerSurveyConfiguration.getSurveyStatus().stream()
123125
.filter(status -> !StringUtils.equalsIgnoreCase(status.getType(), survey.getType()))

0 commit comments

Comments
 (0)