private boolean isDefault;
private String rulesUpdatedAt;
private Long lastUsed;
+ private Long userUpdatedAt;
/**
* @deprecated in 4.4
return this;
}
+ @CheckForNull
+ public Long getUserUpdatedAt() {
+ return userUpdatedAt;
+ }
+
+ public QProfile setUserUpdatedAt(@Nullable Long userUpdatedAt) {
+ this.userUpdatedAt = userUpdatedAt;
+ return this;
+ }
+
public static QProfile from(QualityProfileDto dto) {
return new QProfile()
.setId(dto.getId())
.setParent(dto.getParentKee())
.setDefault(dto.isDefault())
.setRulesUpdatedAt(dto.getRulesUpdatedAt())
- .setLastUsed(dto.getLastUsed());
+ .setLastUsed(dto.getLastUsed())
+ .setUserUpdatedAt(dto.getUserUpdatedAt());
}
@Override
if (profile.getLastUsed() != null) {
profileBuilder.setLastUsed(formatDateTime(profile.getLastUsed()));
}
+ if (profile.getUserUpdatedAt() != null) {
+ profileBuilder.setUserUpdatedAt(formatDateTime(profile.getUserUpdatedAt()));
+ }
profileBuilder.setActiveRuleCount(data.getActiveRuleCount(profileKey));
profileBuilder.setActiveDeprecatedRuleCount(data.getActiveDeprecatedRuleCount(profileKey));
if (!profile.isDefault()) {
.setLanguage(input.getLanguage())
.setDefault(input.isDefault())
.setRulesUpdatedAt(input.getRulesUpdatedAt())
- .setLastUsed(input.getLastUsed());
+ .setLastUsed(input.getLastUsed())
+ .setUserUpdatedAt(input.getUserUpdatedAt());
}
}
}
@Test
public void to_string() {
assertThat(new QProfile().setId(1).setName("Default").setLanguage("java").setParent("Parent").toString())
- .contains("[id=1,key=<null>,name=Default,language=java,parent=Parent,isDefault=false,rulesUpdatedAt=<null>,lastUsed=<null>]");
+ .contains("[id=1,key=<null>,name=Default,language=java,parent=Parent,isDefault=false,rulesUpdatedAt=<null>,lastUsed=<null>,userUpdatedAt=<null>]");
}
@Test
qualityProfileDb.insertQualityProfiles(newQualityProfileDto()
.setLanguage(xoo1.getKey())
.setRulesUpdatedAt("2016-12-21T19:10:03+0100")
- .setLastUsed(time));
+ .setLastUsed(time)
+ .setUserUpdatedAt(time));
SearchWsResponse result = call(ws.newRequest());
assertThat(result.getProfilesCount()).isEqualTo(1);
assertThat(result.getProfiles(0).getRulesUpdatedAt()).isEqualTo("2016-12-21T19:10:03+0100");
assertThat(parseDateTime(result.getProfiles(0).getLastUsed()).getTime()).isEqualTo(time);
+ assertThat(parseDateTime(result.getProfiles(0).getUserUpdatedAt()).getTime()).isEqualTo(time);
}
@Test
optional int64 projectCount = 10;
optional string rulesUpdatedAt = 11;
optional string lastUsed = 13;
+ optional string userUpdatedAt = 14;
}
}