Skip to content

Dtsrd 4084#1004

Open
SabinaHMCTS wants to merge 248 commits into
masterfrom
DTSRD-4084
Open

Dtsrd 4084#1004
SabinaHMCTS wants to merge 248 commits into
masterfrom
DTSRD-4084

Conversation

@SabinaHMCTS

Copy link
Copy Markdown
Contributor

Jira link

See PROJ-XXXXXX

Change description

Testing done

Checklist

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)
  • Does this PR introduce a breaking change

+ "on per.personalCode = appt.personalCode "
+ "LEFT JOIN FETCH judicialOfficeAuthorisation auth "
+ "on auth.appointmentId = appt.appointmentId "
+ "on auth.personalCode = appt.personalCode "

@mattnayler mattnayler Feb 26, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should:

  • always match on personcode 👍
  • also match on either auth.appointmentId is null or auth.appointmentId = appt.appointmentId

i.e. if there is an appointment ID then we should filter the authorisations JOIN on it: with personcode being the fallback for theose authorisations that have no parent appointment so should apply to all of the person's appointments.

var profiles = (List<Map<String, String>>) response.get("body");
if (("BBA3").equals(serviceCode)) {
assertEquals(0, profiles.size());
assertEquals(1, profiles.size());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we confirm in the integration tests data that we have a scenario to test mapping where

  1. mapped via personcode and apponitment_id is null (i.e. data should be found)
  2. mapped via personcode and appointment_id is set to active appointment (i.e. data should be found)
  3. mapped via personcode and appointment_id is set to expired appointment (i.e. data should not be found)

From my quick (possibly incorrect) review of data in 'src/integrationTest/resources/db/testmigration/V1_74__elinks_insert_user_profile.sql': I assume this assert should probably return 0. as I think the appointment has expired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants