Skip to content

Commit f1ed797

Browse files
authored
Merge branch 'develop' into feature-2805/convert-skills-data-structure
2 parents 1a602bd + 71fc0be commit f1ed797

27 files changed

+324
-124
lines changed

.github/workflows/gradle-build-production.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ jobs:
8787
--set-env-vars "^@^MICRONAUT_ENVIRONMENTS=cloud,google,gcp" \
8888
--set-env-vars "SLACK_WEBHOOK_URL=${{ secrets.SLACK_WEBHOOK_URL }}" \
8989
--set-env-vars "SLACK_BOT_TOKEN=${{ secrets.SLACK_BOT_TOKEN }}" \
90-
--set-env-vars "SLACK_PULSE_SIGNING_SECRET=${{ secrets.SLACK_PULSE_SIGNING_SECRET }}" \
91-
--set-env-vars "SLACK_PULSE_BOT_TOKEN=${{ secrets.SLACK_PULSE_BOT_TOKEN }}" \
9290
--set-env-vars "SLACK_KUDOS_CHANNEL_ID=${{ secrets.SLACK_KUDOS_CHANNEL_ID }}" \
91+
--set-env-vars "SLACK_SIGNING_SECRET=${{ secrets.SLACK_PULSE_SIGNING_SECRET }}" \
9392
--platform "managed" \
9493
--max-instances 8 \
9594
--allow-unauthenticated

.github/workflows/gradle-deploy-native-develop.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,8 @@ jobs:
111111
--set-env-vars "^@^MICRONAUT_ENVIRONMENTS=dev,cloud,google,gcp" \
112112
--set-env-vars "SLACK_WEBHOOK_URL=${{ secrets.SLACK_WEBHOOK_URL }}" \
113113
--set-env-vars "SLACK_BOT_TOKEN=${{ secrets.SLACK_BOT_TOKEN }}" \
114-
--set-env-vars "SLACK_PULSE_SIGNING_SECRET=${{ secrets.SLACK_PULSE_SIGNING_SECRET }}" \
115-
--set-env-vars "SLACK_PULSE_BOT_TOKEN=${{ secrets.SLACK_PULSE_BOT_TOKEN }}" \
116114
--set-env-vars "SLACK_KUDOS_CHANNEL_ID=${{ secrets.SLACK_KUDOS_CHANNEL_ID }}" \
115+
--set-env-vars "SLACK_SIGNING_SECRET=${{ secrets.SLACK_PULSE_SIGNING_SECRET }}" \
117116
--platform "managed" \
118117
--max-instances 2 \
119118
--allow-unauthenticated

docker-compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3'
21
services:
32
postgresql:
43
image: postgres:17.2

docs/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ GEM
277277
unf_ext
278278
unf_ext (0.0.9.1)
279279
unicode-display_width (1.8.0)
280-
uri (0.13.0)
280+
uri (0.13.2)
281281
webrick (1.8.2)
282282

283283
PLATFORMS

server/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
id "jacoco"
88
}
99

10-
version "0.8.13"
10+
version "0.8.15"
1111
group "com.objectcomputing.checkins"
1212

1313
repositories {

server/src/main/java/com/objectcomputing/checkins/services/memberprofile/MemberProfile.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ public class MemberProfile {
155155
@TypeDef(type = DataType.DATE, converter = LocalDateConverter.class)
156156
private LocalDate lastSeen;
157157

158+
@Column(name="ignore_birthday")
159+
@Schema(description = "flag indicating the member would like to have their birthday ignored")
160+
@Nullable
161+
private Boolean ignoreBirthday;
162+
158163
public MemberProfile(@NotBlank String firstName,
159164
@Nullable String middleName,
160165
@NotBlank String lastName,
@@ -171,9 +176,10 @@ public MemberProfile(@NotBlank String firstName,
171176
@Nullable LocalDate birthDate,
172177
@Nullable Boolean voluntary,
173178
@Nullable Boolean excluded,
174-
@Nullable LocalDate lastSeen) {
179+
@Nullable LocalDate lastSeen,
180+
@Nullable Boolean ignoreBirthday) {
175181
this(null, firstName, middleName, lastName, suffix, title, pdlId, location, workEmail,
176-
employeeId, startDate, bioText, supervisorid, terminationDate,birthDate, voluntary, excluded, lastSeen);
182+
employeeId, startDate, bioText, supervisorid, terminationDate,birthDate, voluntary, excluded, lastSeen, ignoreBirthday);
177183
}
178184

179185
public MemberProfile(UUID id,
@@ -193,7 +199,8 @@ public MemberProfile(UUID id,
193199
@Nullable LocalDate birthDate,
194200
@Nullable Boolean voluntary,
195201
@Nullable Boolean excluded,
196-
@Nullable LocalDate lastSeen) {
202+
@Nullable LocalDate lastSeen,
203+
@Nullable Boolean ignoreBirthday) {
197204
this.id = id;
198205
this.firstName = firstName;
199206
this.middleName = middleName;
@@ -212,6 +219,7 @@ public MemberProfile(UUID id,
212219
this.voluntary = voluntary;
213220
this.excluded = excluded;
214221
this.lastSeen = lastSeen;
222+
this.ignoreBirthday = ignoreBirthday;
215223
}
216224

217225
public MemberProfile() {
@@ -246,14 +254,15 @@ public boolean equals(Object o) {
246254
Objects.equals(birthDate, that.birthDate) &&
247255
Objects.equals(voluntary, that.voluntary) &&
248256
Objects.equals(excluded, that.excluded) &&
249-
Objects.equals(lastSeen, that.lastSeen);
257+
Objects.equals(lastSeen, that.lastSeen) &&
258+
Objects.equals(ignoreBirthday, that.ignoreBirthday);
250259
}
251260

252261
@Override
253262
public int hashCode() {
254263
return Objects.hash(id, firstName, middleName, lastName, suffix, title, pdlId, location,
255264
workEmail, employeeId, startDate, bioText, supervisorid, terminationDate,birthDate,
256-
voluntary, excluded, lastSeen);
265+
voluntary, excluded, lastSeen, ignoreBirthday);
257266
}
258267

259268
@Override
@@ -274,6 +283,7 @@ public String toString() {
274283
", voluntary=" + voluntary +
275284
", excluded=" + excluded +
276285
", lastSeen=" + lastSeen +
286+
", ignoreBirthday=" + ignoreBirthday +
277287
'}';
278288
}
279289
}

server/src/main/java/com/objectcomputing/checkins/services/memberprofile/MemberProfileController.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public HttpResponse<MemberProfileResponseDTO> getById(UUID id) {
5858
public List<MemberProfileResponseDTO> getSupervisorsForId(UUID id) {
5959
return memberProfileServices.getSupervisorsForId(id)
6060
.stream()
61-
.map(this::fromEntity)
61+
.map(MemberProfileController::fromEntity)
6262
.toList();
6363
}
6464

@@ -83,7 +83,7 @@ public List<MemberProfileResponseDTO> findByValue(@Nullable String firstName,
8383
@QueryValue(value = "terminated", defaultValue = "false") Boolean terminated) {
8484
return memberProfileServices.findByValues(firstName, lastName, title, pdlId, workEmail, supervisorId, terminated)
8585
.stream()
86-
.map(this::fromEntity)
86+
.map(MemberProfileController::fromEntity)
8787
.toList();
8888
}
8989

@@ -128,7 +128,7 @@ protected URI location(UUID id) {
128128
return URI.create("/member-profiles/" + id);
129129
}
130130

131-
private MemberProfileResponseDTO fromEntity(MemberProfile entity) {
131+
public static MemberProfileResponseDTO fromEntity(MemberProfile entity) {
132132
MemberProfileResponseDTO dto = new MemberProfileResponseDTO();
133133
dto.setId(entity.getId());
134134
dto.setFirstName(entity.getFirstName());
@@ -147,20 +147,21 @@ private MemberProfileResponseDTO fromEntity(MemberProfile entity) {
147147
dto.setTerminationDate(entity.getTerminationDate());
148148
dto.setBirthDay(entity.getBirthDate());
149149
dto.setLastSeen(entity.getLastSeen());
150+
dto.setIgnoreBirthday(entity.getIgnoreBirthday());
150151
return dto;
151152
}
152153

153154
private MemberProfile fromDTO(MemberProfileUpdateDTO dto) {
154155
return new MemberProfile(dto.getId(), dto.getFirstName(), dto.getMiddleName(), dto.getLastName(),
155156
dto.getSuffix(), dto.getTitle(), dto.getPdlId(), dto.getLocation(), dto.getWorkEmail(),
156157
dto.getEmployeeId(), dto.getStartDate(), dto.getBioText(), dto.getSupervisorid(),
157-
dto.getTerminationDate(), dto.getBirthDay(), dto.getVoluntary(), dto.getExcluded(), dto.getLastSeen());
158+
dto.getTerminationDate(), dto.getBirthDay(), dto.getVoluntary(), dto.getExcluded(), dto.getLastSeen(), dto.getIgnoreBirthday());
158159
}
159160

160161
private MemberProfile fromDTO(MemberProfileCreateDTO dto) {
161162
return new MemberProfile(dto.getFirstName(), dto.getMiddleName(), dto.getLastName(), dto.getSuffix(),
162163
dto.getTitle(), dto.getPdlId(), dto.getLocation(), dto.getWorkEmail(), dto.getEmployeeId(),
163164
dto.getStartDate(), dto.getBioText(), dto.getSupervisorid(), dto.getTerminationDate(), dto.getBirthDay(),
164-
dto.getVoluntary(), dto.getExcluded(), dto.getLastSeen());
165+
dto.getVoluntary(), dto.getExcluded(), dto.getLastSeen(), dto.getIgnoreBirthday());
165166
}
166167
}

server/src/main/java/com/objectcomputing/checkins/services/memberprofile/MemberProfileCreateDTO.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ public class MemberProfileCreateDTO {
8585
@Schema(description = "Last date employee logged in")
8686
private LocalDate lastSeen;
8787

88+
@Nullable
89+
@Schema(description = "The employee would like their birthday to not be celebrated", nullable = true)
90+
private Boolean ignoreBirthday;
91+
8892
@Override
8993
public boolean equals(Object o) {
9094
if (this == o) return true;
@@ -106,14 +110,15 @@ public boolean equals(Object o) {
106110
Objects.equals(birthDay, that.birthDay) &&
107111
Objects.equals(voluntary, that.voluntary) &&
108112
Objects.equals(excluded, that.excluded) &&
109-
Objects.equals(lastSeen, that.lastSeen);
113+
Objects.equals(lastSeen, that.lastSeen) &&
114+
Objects.equals(ignoreBirthday, that.ignoreBirthday);
110115

111116
}
112117

113118
@Override
114119
public int hashCode() {
115120
return Objects.hash(firstName, middleName, lastName, suffix, title, pdlId, location,
116121
workEmail, employeeId, startDate, bioText, supervisorid, terminationDate, birthDay,
117-
voluntary, excluded, lastSeen);
122+
voluntary, excluded, lastSeen, ignoreBirthday);
118123
}
119124
}

server/src/main/java/com/objectcomputing/checkins/services/memberprofile/MemberProfileRepository.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public interface MemberProfileRepository extends CrudRepository<MemberProfile, U
2727
"PGP_SYM_DECRYPT(cast(workEmail as bytea), '${aes.key}') as workEmail, " +
2828
"employeeId, startDate, " +
2929
"PGP_SYM_DECRYPT(cast(bioText as bytea), '${aes.key}') as bioText, " +
30-
"supervisorid, terminationDate, birthDate, voluntary, excluded, last_seen " +
30+
"supervisorid, terminationDate, birthDate, voluntary, excluded, last_seen, ignore_birthday " +
3131
"FROM \"member_profile\" mp " +
3232
"WHERE (:workEmail IS NULL OR PGP_SYM_DECRYPT(cast(mp.workEmail as bytea), '${aes.key}') = :workEmail) ",
3333
nativeQuery = true)
@@ -44,7 +44,7 @@ public interface MemberProfileRepository extends CrudRepository<MemberProfile, U
4444
"PGP_SYM_DECRYPT(cast(workEmail as bytea), '${aes.key}') as workEmail, " +
4545
"employeeId, startDate, " +
4646
"PGP_SYM_DECRYPT(cast(bioText as bytea), '${aes.key}') as bioText, " +
47-
"supervisorid, terminationDate, birthDate, voluntary, excluded, last_seen " +
47+
"supervisorid, terminationDate, birthDate, voluntary, excluded, last_seen, ignore_birthday " +
4848
"FROM \"member_profile\" mp " +
4949
"WHERE (:firstName IS NULL OR PGP_SYM_DECRYPT(cast(mp.firstName as bytea),'${aes.key}') = :firstName) " +
5050
"AND (:middleName IS NULL OR PGP_SYM_DECRYPT(cast(mp.middleName as bytea),'${aes.key}') = :middleName) " +
@@ -72,12 +72,12 @@ WHERE mp.id IN (:ids)""",
7272
List<String> findWorkEmailByIdIn(Set<String> ids);
7373

7474
@Query(value = "WITH RECURSIVE subordinate AS (SELECT " +
75-
"id, firstname, middlename, lastname, suffix, title, pdlid, location, workemail, employeeid, startdate, biotext, supervisorid, terminationdate, birthdate, voluntary, excluded, last_seen, 0 as level " +
75+
"id, firstname, middlename, lastname, suffix, title, pdlid, location, workemail, employeeid, startdate, biotext, supervisorid, terminationdate, birthdate, voluntary, excluded, last_seen, ignore_birthday, 0 as level " +
7676
"FROM member_profile " +
7777
"WHERE id = :id and terminationdate is NULL " +
7878
" UNION ALL " +
7979
"SELECT " +
80-
"e.id, e.firstname, e.middlename, e.lastname, e.suffix, e.title, e.pdlid, e.location, e.workemail, e.employeeid, e.startdate, e.biotext, e.supervisorid, e.terminationdate, e.birthdate, e.voluntary, e.excluded, e.last_seen, level + 1 " +
80+
"e.id, e.firstname, e.middlename, e.lastname, e.suffix, e.title, e.pdlid, e.location, e.workemail, e.employeeid, e.startdate, e.biotext, e.supervisorid, e.terminationdate, e.birthdate, e.voluntary, e.excluded, e.last_seen, e.ignore_birthday, level + 1 " +
8181
"FROM member_profile e " +
8282
"JOIN subordinate s " +
8383
"ON s.supervisorid = e.id " +
@@ -96,7 +96,7 @@ WHERE mp.id IN (:ids)""",
9696
"PGP_SYM_DECRYPT(cast(s.workemail as bytea), '${aes.key}') as workemail, " +
9797
"s.employeeid, s.startdate, " +
9898
"PGP_SYM_DECRYPT(cast(s.biotext as bytea), '${aes.key}') as biotext, " +
99-
"s.supervisorid, s.terminationdate, s.birthdate, s.voluntary, s.excluded, s.last_seen, " +
99+
"s.supervisorid, s.terminationdate, s.birthdate, s.voluntary, s.excluded, s.last_seen, s.ignore_birthday, " +
100100
"s.level " +
101101
"FROM subordinate s " +
102102
"WHERE s.id <> :id " +
@@ -106,11 +106,11 @@ WHERE mp.id IN (:ids)""",
106106
@Query(
107107
value = """
108108
WITH RECURSIVE subordinate AS (
109-
SELECT id, firstname, middlename, lastname, suffix, title, pdlid, location, workemail, employeeid, startdate, biotext, supervisorid, terminationdate, birthdate, voluntary, excluded, last_seen, 0 as level
109+
SELECT id, firstname, middlename, lastname, suffix, title, pdlid, location, workemail, employeeid, startdate, biotext, supervisorid, terminationdate, birthdate, voluntary, excluded, last_seen, ignore_birthday, 0 as level
110110
FROM member_profile
111111
WHERE id = :id and terminationdate is NULL
112112
UNION ALL
113-
SELECT e.id, e.firstname, e.middlename, e.lastname, e.suffix, e.title, e.pdlid, e.location, e.workemail, e.employeeid, e.startdate, e.biotext, e.supervisorid, e.terminationdate, e.birthdate, e.voluntary, e.excluded, e.last_seen, level + 1
113+
SELECT e.id, e.firstname, e.middlename, e.lastname, e.suffix, e.title, e.pdlid, e.location, e.workemail, e.employeeid, e.startdate, e.biotext, e.supervisorid, e.terminationdate, e.birthdate, e.voluntary, e.excluded, e.last_seen, e.ignore_birthday, level + 1
114114
FROM member_profile AS e JOIN subordinate AS s ON s.id = e.supervisorid
115115
WHERE e.terminationdate is NULL
116116
)
@@ -126,7 +126,7 @@ WITH RECURSIVE subordinate AS (
126126
PGP_SYM_DECRYPT(cast(s.workemail as bytea), '${aes.key}') as workemail,
127127
s.employeeid, s.startdate,
128128
PGP_SYM_DECRYPT(cast(s.biotext as bytea), '${aes.key}') as biotext,
129-
s.supervisorid, s.terminationdate, s.birthdate, s.voluntary, s.excluded, s.last_seen,
129+
s.supervisorid, s.terminationdate, s.birthdate, s.voluntary, s.excluded, s.last_seen, s.ignore_birthday,
130130
s.level
131131
FROM subordinate s
132132
WHERE s.id <> :id

server/src/main/java/com/objectcomputing/checkins/services/memberprofile/MemberProfileResponseDTO.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ public class MemberProfileResponseDTO {
9292
@Schema(description = "Last date employee logged in")
9393
private LocalDate lastSeen;
9494

95+
@Nullable
96+
@Schema(description = "The employee would like their birthday to not be celebrated", nullable = true)
97+
private Boolean ignoreBirthday;
98+
9599
@Override
96100
public String toString() {
97101
return "MemberProfileResponseDTO{" +
@@ -114,6 +118,7 @@ public String toString() {
114118
", voluntary=" + voluntary +
115119
", excluded=" + excluded +
116120
", lastSeen=" + lastSeen +
121+
", ignoreBirthday=" + ignoreBirthday +
117122
'}';
118123
}
119124
}

0 commit comments

Comments
 (0)