Skip to content

Commit

Permalink
Updated made on call a required field.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Edwards-cgi committed Aug 30, 2024
1 parent a44626f commit a94a24d
Show file tree
Hide file tree
Showing 19 changed files with 213 additions and 207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;

Expand Down Expand Up @@ -74,8 +75,7 @@ private void validateJurorWasCompleted(LocalDate completionTime, String jurorNum
JurorPool jurorPool = jurorPoolRepository.findByJurorJurorNumberAndPoolPoolNumber(jurorNumber, poolNumber);
assertEquals(true, jurorPool.getIsActive(),
"Juror pool should be active");
assertEquals(false, jurorPool.getOnCall(),
"Juror pool should not be on call");
assertFalse(jurorPool.isOnCall(), "Juror pool should not be on call");
assertEquals(IJurorStatus.COMPLETED, jurorPool.getStatus().getStatus(),
"Juror pool status should be completed");
Juror juror = jurorPool.getJuror();
Expand All @@ -85,7 +85,7 @@ private void validateJurorWasCompleted(LocalDate completionTime, String jurorNum

if (isDismissal) {
assertThat(jurorPool.getNextDate()).isNull();
assertThat(jurorPool.getOnCall()).isFalse();
assertThat(jurorPool.isOnCall()).isFalse();
}
List<JurorHistory> jurorHistories = jurorHistoryRepository.findByJurorNumberOrderById(jurorNumber);
assertEquals(1, jurorHistories.size(), "Should only be one history entry");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ void updateAttendanceDateOnCallFlagUpdated() {

// check the on-call flag before invoking the api
Boolean onCallFlagBefore =
jurorPoolRepository.findByJurorJurorNumberAndPoolPoolNumber(JUROR6, POOL_NUMBER_415230101).getOnCall();
jurorPoolRepository.findByJurorJurorNumberAndPoolPoolNumber(JUROR6, POOL_NUMBER_415230101).isOnCall();
assertThat(onCallFlagBefore).as("On-call flag should be True").isEqualTo(Boolean.TRUE);

ResponseEntity<String> responseEntity =
Expand All @@ -1296,7 +1296,7 @@ void updateAttendanceDateOnCallFlagUpdated() {

// verify the on-call flag was updated successfully
Boolean onCallFlagAfter =
jurorPoolRepository.findByJurorJurorNumberAndPoolPoolNumber(JUROR6, POOL_NUMBER_415230101).getOnCall();
jurorPoolRepository.findByJurorJurorNumberAndPoolPoolNumber(JUROR6, POOL_NUMBER_415230101).isOnCall();
assertThat(onCallFlagAfter).as("On-call flag should be False").isEqualTo(Boolean.FALSE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ private void transferJurorPoolValidateNewlyCreatedJurorPool(String jurorNumber,
assertThat(targetJurorPool.getEditTag())
.as(EXPECT_PROPERTY_TO_BE_USE_A_DEFAULT_VALUE)
.isNull();
assertThat(targetJurorPool.getOnCall())
assertThat(targetJurorPool.isOnCall())
.as(EXPECT_PROPERTY_TO_BE_USE_A_DEFAULT_VALUE)
.isFalse();
assertThat(targetJurorPool.getSmartCard())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ INSERT INTO juror_mod.juror (juror_number, last_name, first_name, dob, address_l
('641800002', 'PERSON', 'TEST', '1990-05-16', '542 STREET NAME', 'ANYTOWN', 'CH1 2AN', true, null),
('641800003', 'PERSON', 'TEST', '1990-05-16', '542 STREET NAME', 'ANYTOWN', 'CH1 2AN', true, '2023-10-24');

INSERT INTO juror_mod.juror_pool (owner, juror_number, pool_number, is_active, next_date, status, on_call) VALUES
('400', '641600001', '416230101', true, '2023-01-23', 2, null),
('416', '641600002', '416230103', true, '2023-01-23', 13, null),
('417', '641700001', '417230101', true, '2023-01-09', 13, null),
('417', '641700002', '417230101', true, '2023-01-09', 7, null),
('417', '641700003', '417230101', true, '2023-01-09', 2, null),
('417', '641700004', '417230101', true, '2023-01-09', 2, true),
('417', '641700005', '417230101', true, '2023-01-09', 4, null),
('417', '641700006', '417230101', true, '2023-01-09', 2, null),
('418', '641800001', '418230101', true, '2023-10-25', 2, null),
('418', '641800002', '418230102', true, '2023-10-23', 2, null),
('418', '641800003', '418230103', true, '2023-10-23', 13, null);
INSERT INTO juror_mod.juror_pool (owner, juror_number, pool_number, is_active, next_date, status) VALUES
('400', '641600001', '416230101', true, '2023-01-23', 2),
('416', '641600002', '416230103', true, '2023-01-23', 13),
('417', '641700001', '417230101', true, '2023-01-09', 13),
('417', '641700002', '417230101', true, '2023-01-09', 7),
('417', '641700003', '417230101', true, '2023-01-09', 2),
('417', '641700004', '417230101', true, '2023-01-09', 2),
('417', '641700005', '417230101', true, '2023-01-09', 4),
('417', '641700006', '417230101', true, '2023-01-09', 2),
('418', '641800001', '418230101', true, '2023-10-25', 2),
('418', '641800002', '418230102', true, '2023-10-23', 2),
('418', '641800003', '418230103', true, '2023-10-23', 13);


INSERT INTO juror_mod.appearance (attendance_date,juror_number,pool_number,loc_code,f_audit,time_in,time_out,travel_time,appearance_stage,non_attendance) VALUES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,18 @@ INSERT INTO juror_mod.juror (juror_number, last_name, first_name, dob, address_l
('641800003', 'PERSON', 'TEST', '1990-05-16', '542 STREET NAME', 'ANYTOWN', 'CH1 2AN', true, '2023-10-24');

INSERT INTO juror_mod.juror_pool (owner, juror_number, pool_number, is_active, next_date, status, on_call) VALUES
('400', '641600001', '416230101', true, '2023-01-23', 2, null),
('416', '641600002', '416230103', true, '2023-01-23', 13, null),
('415', '641500001', '415230101', true, current_date - 10, 13, null),
('415', '641500002', '415230101', true, current_date - 10, 7, null),
('415', '641500003', '415230101', true, current_date - 10, 2, null),
('400', '641600001', '416230101', true, '2023-01-23', 2, false),
('416', '641600002', '416230103', true, '2023-01-23', 13, false),
('415', '641500001', '415230101', true, current_date - 10, 13, false),
('415', '641500002', '415230101', true, current_date - 10, 7, false),
('415', '641500003', '415230101', true, current_date - 10, 2, false),
('415', '641500004', '415230101', true, current_date - 10, 2, true),
('415', '641500005', '415230101', true, current_date - 10, 4, null),
('415', '641500006', '415230101', true, current_date - 10, 2, null),
('415', '641500007', '415230101', true, current_date - 10, 2, null),
('418', '641800001', '418230101', true, '2023-10-25', 2, null),
('418', '641800002', '418230102', true, '2023-10-23', 2, null),
('418', '641800003', '418230103', true, '2023-10-23', 13, null);
('415', '641500005', '415230101', true, current_date - 10, 4, false),
('415', '641500006', '415230101', true, current_date - 10, 2, false),
('415', '641500007', '415230101', true, current_date - 10, 2, false),
('418', '641800001', '418230101', true, '2023-10-25', 2, false),
('418', '641800002', '418230102', true, '2023-10-23', 2, false),
('418', '641800003', '418230103', true, '2023-10-23', 13, false);

INSERT INTO juror_mod.appearance (attendance_date,juror_number,pool_number,loc_code,f_audit,time_in,time_out,travel_time,appearance_stage,non_attendance) VALUES
(current_date,'641500003','415230101','415',123456789,'09:30:00',null,'01:12','CHECKED_IN',false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ VALUES ('415', '111111111', '415220502', true, CURRENT_DATE + interval '6 weeks'
('400', '121314151', '415220502', true, CURRENT_DATE + interval '6 weeks', 2);

INSERT INTO juror_mod.juror_pool(juror_number, pool_number, "owner", user_edtq, is_active, status, times_sel, def_date, "location", no_attendances, no_attended, no_fta, no_awol, pool_seq, edit_tag, next_date, on_call, smart_card, was_deferred, deferral_code, id_checked, postpone, paid_cash, scan_code, last_update, reminder_sent, transfer_date, date_created) VALUES
('641500001', '415240601', '415', 'court-southwark', true, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0002', NULL, '2024-06-11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-04-09 15:07:32.570', NULL, NULL, '2024-04-09 15:06:58.069');
('641500001', '415240601', '415', 'court-southwark', true, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0002', NULL, '2024-06-11', false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-04-09 15:07:32.570', NULL, NULL, '2024-04-09 15:06:58.069');

INSERT INTO juror_mod.juror_pool(juror_number, pool_number, "owner", user_edtq, is_active, status, times_sel, def_date, "location", no_attendances, no_attended, no_fta, no_awol, pool_seq, edit_tag, next_date, on_call, smart_card, was_deferred, deferral_code, id_checked, postpone, paid_cash, scan_code, last_update, reminder_sent, transfer_date, date_created) VALUES
('641500001', '471240401', '471', 'court-southwark', true, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0001', NULL, '2024-04-29', false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-04-09 15:12:48.674', NULL, NULL, '2024-04-09 15:12:48.674');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ INSERT INTO juror_mod.juror_pool (owner, juror_number, pool_number, is_active, n
('400', '555555555', '457230801', true, '2022-05-03', 2);

INSERT INTO juror_mod.juror_pool(juror_number, pool_number, "owner", user_edtq, is_active, status, times_sel, def_date, "location", no_attendances, no_attended, no_fta, no_awol, pool_seq, edit_tag, next_date, on_call, smart_card, was_deferred, deferral_code, id_checked, postpone, paid_cash, scan_code, last_update, reminder_sent, transfer_date, date_created) VALUES
('641500001', '415240601', '415', 'court-southwark', true, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0002', NULL, '2024-06-11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-04-09 15:07:32.570', NULL, NULL, '2024-04-09 15:06:58.069');
('641500001', '415240601', '415', 'court-southwark', true, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0002', NULL, '2024-06-11', false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-04-09 15:07:32.570', NULL, NULL, '2024-04-09 15:06:58.069');

INSERT INTO juror_mod.juror_pool(juror_number, pool_number, "owner", user_edtq, is_active, status, times_sel, def_date, "location", no_attendances, no_attended, no_fta, no_awol, pool_seq, edit_tag, next_date, on_call, smart_card, was_deferred, deferral_code, id_checked, postpone, paid_cash, scan_code, last_update, reminder_sent, transfer_date, date_created) VALUES
('641500001', '471240401', '471', 'court-southwark', true, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0001', NULL, '2024-04-29', false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-04-09 15:12:48.674', NULL, NULL, '2024-04-09 15:12:48.674');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,27 @@ INSERT INTO juror_mod.juror (juror_number, last_name, first_name, dob, address_l
('641900001', 'PERSON1', 'TEST', '1990-05-16', '542 STREET NAME', 'ANYTOWN', 'CH1 2AN', true, null);

INSERT INTO juror_mod.juror_pool (owner, juror_number, pool_number, is_active, next_date, status, on_call) VALUES
('400', '641600001', '416230101', true, '2023-01-23', 2, null),
('416', '641600002', '416230103', true, '2023-01-23', 13, null),
('417', '641700001', '417230101', true, '2023-01-09', 13, null),
('417', '641700002', '417230101', true, '2023-01-09', 7, null),
('417', '641700003', '417230101', true, '2023-01-09', 2, null),
('400', '641600001', '416230101', true, '2023-01-23', 2, false),
('416', '641600002', '416230103', true, '2023-01-23', 13, false),
('417', '641700001', '417230101', true, '2023-01-09', 13, false),
('417', '641700002', '417230101', true, '2023-01-09', 7, false),
('417', '641700003', '417230101', true, '2023-01-09', 2, false),
('417', '641700004', '417230101', true, '2023-01-09', 2, true),
('417', '641700005', '417230101', true, '2023-01-09', 4, null),
('417', '641700006', '417230101', true, '2023-01-09', 2, null),
('417', '641700007', '417230101', true, '2023-01-09', 2, null),
('417', '641700008', '417230101', true, '2023-01-09', 2, null),
('417', '641700009', '417230101', true, '2023-01-09', 3, null),
('417', '641700010', '417230101', true, '2023-01-09', 3, null),
('417', '641700011', '417230101', true, '2023-01-09', 4, null),
('417', '641700012', '417230101', true, '2023-01-09', 4, null),
('417', '641700013', '417230101', true, '2023-01-09', 4, null),
('417', '641700014', '417230101', true, '2023-01-09', 3, null),
('418', '641800001', '418230101', true, '2023-10-25', 2, null),
('418', '641800002', '418230102', true, '2023-10-23', 2, null),
('418', '641800003', '418230103', true, '2023-10-23', 2, null),
('418', '641800004', '418230102', true, '2023-10-23', 3, null),
('418', '641800005', '418230103', true, '2023-10-23', 4, null),
('417', '641700005', '417230101', true, '2023-01-09', 4, false),
('417', '641700006', '417230101', true, '2023-01-09', 2, false),
('417', '641700007', '417230101', true, '2023-01-09', 2, false),
('417', '641700008', '417230101', true, '2023-01-09', 2, false),
('417', '641700009', '417230101', true, '2023-01-09', 3, false),
('417', '641700010', '417230101', true, '2023-01-09', 3, false),
('417', '641700011', '417230101', true, '2023-01-09', 4, false),
('417', '641700012', '417230101', true, '2023-01-09', 4, false),
('417', '641700013', '417230101', true, '2023-01-09', 4, false),
('417', '641700014', '417230101', true, '2023-01-09', 3, false),
('418', '641800001', '418230101', true, '2023-10-25', 2, false),
('418', '641800002', '418230102', true, '2023-10-23', 2, false),
('418', '641800003', '418230103', true, '2023-10-23', 2, false),
('418', '641800004', '418230102', true, '2023-10-23', 3, false),
('418', '641800005', '418230103', true, '2023-10-23', 4, false),
('419', '641900001', '419230101', true, '2023-10-23', 2, true);

INSERT INTO juror_mod.appearance (attendance_date,juror_number,pool_number,loc_code,f_audit,time_in,time_out,travel_time,appearance_stage,non_attendance) VALUES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ INSERT INTO juror_mod.juror (juror_number,poll_number,title,last_name,first_name
('641500216','216',NULL,'LNAMEONESIXT','FNAMEONESIX',NULL,'16 STREET NAME','ANYTOWN',NULL,NULL,NULL,'CH1 2AN',NULL,NULL,NULL,false,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,false,'NOT_CHECKED','2024-06-11 13:57:15',NULL,NULL,NULL,NULL,0,'2024-06-03 15:33:11.314842',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,false,NULL,0,false,NULL);

INSERT INTO juror_mod.juror_pool (juror_number,pool_number,"owner",user_edtq,is_active,status,times_sel,def_date,"location",no_attendances,no_attended,no_fta,no_awol,pool_seq,edit_tag,next_date,on_call,smart_card,was_deferred,deferral_code,id_checked,postpone,paid_cash,scan_code,last_update,reminder_sent,transfer_date,date_created) VALUES
('641500017','415240801','400','ADMINUSER',true,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0015',NULL,'2024-08-05',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2024-06-04 11:14:27.130294',true,NULL,'2024-06-03 12:00:23.127317'),
('641500212','415240801','400','ADMINUSER',true,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0019',NULL,'2024-08-05',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2024-06-03 15:33:11.348805',NULL,NULL,'2024-06-03 15:33:11.348805'),
('641500211','415240801','400','ADMINUSER',true,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0023',NULL,'2024-08-05',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2024-06-03 15:33:11.357346',NULL,NULL,'2024-06-03 15:33:11.357346'),
('641500216','415240801','400','ADMINUSER',true,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0025',NULL,'2024-08-05',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2024-06-03 15:33:11.361174',NULL,NULL,'2024-06-03 15:33:11.361174'),
('641500316','415240801','400','ADMINUSER',true,2,NULL,'2024-08-20',NULL,NULL,NULL,NULL,NULL,'0005',NULL,NULL,NULL,NULL,true,NULL,NULL,NULL,NULL,NULL,'2024-06-03 15:57:45.605066',true,NULL,'2024-06-03 12:00:23.10279'),
('641500316','415240804','400','ADMINUSER',false,7,NULL,'2024-08-20',NULL,NULL,NULL,NULL,NULL,'0005',NULL,NULL,NULL,NULL,NULL,'M',NULL,NULL,NULL,NULL,'2024-06-03 15:57:45.605066',NULL,NULL,'2024-06-03 12:00:23.10279'),
('641500223','415240802','400','ADMINUSER',true,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0020',NULL,'2024-08-05',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2024-06-11 13:55:51.432707',true,NULL,'2024-06-03 15:33:11.351721');
('641500017','415240801','400','ADMINUSER',true,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0015',NULL,'2024-08-05',false,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2024-06-04 11:14:27.130294',true,NULL,'2024-06-03 12:00:23.127317'),
('641500212','415240801','400','ADMINUSER',true,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0019',NULL,'2024-08-05',false,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2024-06-03 15:33:11.348805',NULL,NULL,'2024-06-03 15:33:11.348805'),
('641500211','415240801','400','ADMINUSER',true,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0023',NULL,'2024-08-05',false,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2024-06-03 15:33:11.357346',NULL,NULL,'2024-06-03 15:33:11.357346'),
('641500216','415240801','400','ADMINUSER',true,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0025',NULL,'2024-08-05',false,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2024-06-03 15:33:11.361174',NULL,NULL,'2024-06-03 15:33:11.361174'),
('641500316','415240801','400','ADMINUSER',true,2,NULL,'2024-08-20',NULL,NULL,NULL,NULL,NULL,'0005',NULL,NULL,false,NULL,true,NULL,NULL,NULL,NULL,NULL,'2024-06-03 15:57:45.605066',true,NULL,'2024-06-03 12:00:23.10279'),
('641500316','415240804','400','ADMINUSER',false,7,NULL,'2024-08-20',NULL,NULL,NULL,NULL,NULL,'0005',NULL,NULL,false,NULL,NULL,'M',NULL,NULL,NULL,NULL,'2024-06-03 15:57:45.605066',NULL,NULL,'2024-06-03 12:00:23.10279'),
('641500223','415240802','400','ADMINUSER',true,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0020',NULL,'2024-08-05',false,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2024-06-11 13:55:51.432707',true,NULL,'2024-06-03 15:33:11.351721');

INSERT INTO juror_mod.bulk_print_data (juror_no,creation_date,form_type,detail_rec,extracted_flag,digital_comms) VALUES
('641500017',current_date - 1,'5227','14 JUNE 2024 THE CROWN COURT AT CHESTER JURY CENTRAL SUMMONING BUREAU THE COURT SERVICE FREEPOST LON 19669 POCOCK STREET LONDON SE1 0YG 0845 3555567 PART 2 SECTION D FNAMEONESEVEN LNAMEONESEVEN 17 STREET NAME ANYTOWN CH3 2AR 641500017JURY MANAGER ',false,false),
Expand Down
Loading

0 comments on commit a94a24d

Please sign in to comment.