From 56365d5c08e88fb75e6e7b49ea0f0a53a4e0713f Mon Sep 17 00:00:00 2001 From: Imran Date: Tue, 17 Jun 2025 10:15:30 +0100 Subject: [PATCH 01/18] added partial datafix --- .../db/migration/V212__mce_datafixes.sql | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 src/main/resources/db/migration/V212__mce_datafixes.sql diff --git a/src/main/resources/db/migration/V212__mce_datafixes.sql b/src/main/resources/db/migration/V212__mce_datafixes.sql new file mode 100644 index 00000000..fb65afa4 --- /dev/null +++ b/src/main/resources/db/migration/V212__mce_datafixes.sql @@ -0,0 +1,151 @@ +UPDATE search_court +SET + info = + case + WHEN slug = 'old-2-traffic-enforcement-centre-tec' + THEN 'Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' + + WHEN slug = 'clerkenwell-and-shoreditch-county-court-and-family-court' + THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Court Fees. If unsure about your Court Fee, please see EX50: Fees in the civil and family courts – main fees (EX50) - GOV.UK (https://www.gov.uk/government/publications/fees-in-the-civil-and-family-courts-main-fees-ex50). If you think you qualify for Help with Fees, please see EX160A: How to apply for help with fees: EX160A - GOV.UK (https://www.gov.uk/government/publications/apply-for-help-with-court-and-tribunal-fees/how-to-apply-for-help-with-fees-ex160a-for-applications-made-or-fees-paid-on-or-after-27-november-2023). Please make sure your application / documents / paperwork is submitted with the payment method. Please note, if you have requested to be called to collect a court fee, the call will come from an unknown number. Cheques / Postal Orders (made payable to ‘HMCTS’). Post to the Court or place in the Drop Box with the relevant paperwork. Card Payments. Post to the Court, place in the Drop Box, or Email the Court your contact details, with the relevant paperwork. Alternatively, telephone the Enquiries line. A handoff will be sent to the Court, and you will be contacted by us.' + + WHEN slug = 'central-family-court' + THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). For urgent without notice applications, e.g. non-molestation orders and prohibited steps orders please contact cfc.urgentapplications@justice.gov.uk' + + WHEN slug = 'barnet-civil-and-family-courts-centre' + THEN 'Cases will be heard at alternative venues to minimise disruption, please check your hearing notice or the daily court list (https://www.courtserve.net/courtlists/current/county/indexv2county.php) for more info. If you have a case at Barnet, please write to us at: 9 Acton Lane, Harlesden, London, NW10 8SB. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' + + WHEN slug = 'romford-social-security-and-child-support' + THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Romford Magistrates'' Court (formerly Havering Magistrates'' Court). Access to Social Security Tribunals. The entrance to the Tribunal Service is separate to the Magistrates Court entrance. Access is via the car park on the left-hand side of the Magistrates court. Please enter the car park and keep to the right side. You will see a Tribunal service sign on the entrance door. If you attempt to enter the Magistrates court entrance, you will be sent back around to the side of the building to enter via the SSCS Tribunal Service door.' + + WHEN slug = 'traffic-enforcement-centre-tec' + THEN 'Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). DX code: 702885 Northampton 7. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' + + WHEN slug = 'traffic-enforcement-centre-tec-old' + THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' + + WHEN slug = 'northampton-crown-county-and-family-court' + THEN 'The Civil National Business Centre (formerly CCBC) is also in Northampton and is an entirely separate entity to Northampton Crown, County and Family Court. Northampton County and Family Court cannot answer queries on behalf of CNBC. Follow link (https://www.find-court-tribunal.service.gov.uk/courts/county-court-business-centre-ccbc). Opening times - Monday to Friday 08:30 to 17:00. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' + + WHEN slug = 'civil-national-business-centre-cnbc' + THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). To enable us to better direct your contact please use our Signposting Tool (https://civil-national-business-centre-cnbc.form.service.justice.gov.uk/). Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc).' + + -- if not set then leave it blank + WHEN info = '' or info is null + THEN '' + + -- default about 95% of it to the main statement + ELSE 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' + end; + +--UPDATE search_court +--SET +-- info_cy = +-- case + +-- need to get welsh translation fixes + +-- +-- WHEN slug = 'old-2-traffic-enforcement-centre-tec' +-- THEN 'Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' +-- +-- WHEN slug = 'clerkenwell-and-shoreditch-county-court-and-family-court' +-- THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Court Fees. If unsure about your Court Fee, please see EX50: Fees in the civil and family courts – main fees (EX50) - GOV.UK (https://www.gov.uk/government/publications/fees-in-the-civil-and-family-courts-main-fees-ex50). If you think you qualify for Help with Fees, please see EX160A: How to apply for help with fees: EX160A - GOV.UK (https://www.gov.uk/government/publications/apply-for-help-with-court-and-tribunal-fees/how-to-apply-for-help-with-fees-ex160a-for-applications-made-or-fees-paid-on-or-after-27-november-2023). Please make sure your application / documents / paperwork is submitted with the payment method. Please note, if you have requested to be called to collect a court fee, the call will come from an unknown number. Cheques / Postal Orders (made payable to ‘HMCTS’). Post to the Court or place in the Drop Box with the relevant paperwork. Card Payments. Post to the Court, place in the Drop Box, or Email the Court your contact details, with the relevant paperwork. Alternatively, telephone the Enquiries line. A handoff will be sent to the Court, and you will be contacted by us.' +-- +-- WHEN slug = 'central-family-court' +-- THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). For urgent without notice applications, e.g. non-molestation orders and prohibited steps orders please contact cfc.urgentapplications@justice.gov.uk' +-- +-- WHEN slug = 'barnet-civil-and-family-courts-centre' +-- THEN 'Cases will be heard at alternative venues to minimise disruption, please check your hearing notice or the daily court list (https://www.courtserve.net/courtlists/current/county/indexv2county.php) for more info. If you have a case at Barnet, please write to us at: 9 Acton Lane, Harlesden, London, NW10 8SB. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' +-- +-- WHEN slug = 'romford-social-security-and-child-support' +-- THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Romford Magistrates'' Court (formerly Havering Magistrates'' Court). Access to Social Security Tribunals. The entrance to the Tribunal Service is separate to the Magistrates Court entrance. Access is via the car park on the left-hand side of the Magistrates court. Please enter the car park and keep to the right side. You will see a Tribunal service sign on the entrance door. If you attempt to enter the Magistrates court entrance, you will be sent back around to the side of the building to enter via the SSCS Tribunal Service door.' +-- +-- WHEN slug = 'traffic-enforcement-centre-tec' +-- THEN 'Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). DX code: 702885 Northampton 7. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' +-- +-- WHEN slug = 'traffic-enforcement-centre-tec-old' +-- THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' +-- +-- WHEN slug = 'northampton-crown-county-and-family-court' +-- THEN 'The Civil National Business Centre (formerly CCBC) is also in Northampton and is an entirely separate entity to Northampton Crown, County and Family Court. Northampton County and Family Court cannot answer queries on behalf of CNBC. Follow link (https://www.find-court-tribunal.service.gov.uk/courts/county-court-business-centre-ccbc). Opening times - Monday to Friday 08:30 to 17:00. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' +-- +-- WHEN slug = 'civil-national-business-centre-cnbc' +-- THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). To enable us to better direct your contact please use our Signposting Tool (https://civil-national-business-centre-cnbc.form.service.justice.gov.uk/). Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc).' +-- +-- -- if not set then leave it blank +-- WHEN info_cy = '' or info_cy is null +-- THEN '' +-- +-- -- default about 95% of it to the main statement +-- ELSE 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' +-- + +-- end; + + + + + + +-- Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). +-- +-- Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). +-- +-- If unsure about your Court Fee, please see EX50: Fees in the civil and family courts – main fees (EX50) - GOV.UK (https://www.gov.uk/government/publications/fees-in-the-civil-and-family-courts-main-fees-ex50). If you think you qualify for Help with Fees, please see EX160A: How to apply for help with fees: EX160A - GOV.UK (https://www.gov.uk/government/publications/apply-for-help-with-court-and-tribunal-fees/how-to-apply-for-help-with-fees-ex160a-for-applications-made-or-fees-paid-on-or-after-27-november-2023). Please make sure your application / documents / paperwork is submitted with the payment method. Please note, if you have requested to be called to collect a court fee, the call will come from an unknown number. Cheques / Postal Orders (made payable to ‘HMCTS’). Post to the Court or place in the Drop Box with the relevant paperwork. for card payments, post it to the court, place it in the drop box, or email the court your contact details, with the relevant paperwork. Alternatively, telephone the enquiries line. A handoff will be sent to the court, and you will be contacted by us. +-- +-- For urgent without notice applications, e.g. non-molestation orders and prohibited steps orders please contact cfc.urgentapplications@justice.gov.uk +-- +-- Cases will be heard at alternative venues to minimise disruption, please check your hearing notice or the daily court list (https://www.courtserve.net/courtlists/current/county/indexv2county.php) for more info. If you have a case at Barnet, please write to us at: 9 Acton Lane, Harlesden, London, NW10 8SB. +-- +-- Romford Magistrates' Court (formerly Havering Magistrates' Court). Access to Social Security Tribunals. The entrance to the Tribunal Service is separate to the Magistrates Court entrance. Access is via the car park on the left-hand side of the Magistrates court. Please enter the car park and keep to the right side. You will see a Tribunal service sign on the entrance door. If you attempt to enter the Magistrates court entrance, you will be sent back around to the side of the building to enter via the SSCS Tribunal Service door. +-- +-- DX code: 702885 Northampton 7. +-- +-- Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order). +-- +-- The Civil National Business Centre (formerly CCBC) is also in Northampton and is an entirely separate entity to Northampton Crown, County and Family Court. Northampton County and Family Court cannot answer queries on behalf of CNBC. Follow link (https://www.find-court-tribunal.service.gov.uk/courts/county-court-business-centre-ccbc). Opening times - Monday to Friday 08:30 to 17:00. +-- +-- To enable us to better direct your contact please use our Signposting Tool (https://civil-national-business-centre-cnbc.form.service.justice.gov.uk/). Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). +-- + + +UPDATE search_court +SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), ''', '''', 'g') +where slug in ('barnet-civil-and-family-courts-centre','gateshead-magistrates-court-and-family-court'); + +UPDATE search_court +SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), '@', '@', 'g') +where slug = 'blackpool-family-and-civil-court'; + +UPDATE search_court +SET alert = 'Our lift is out of service, with no level access to courtrooms. We apologise for any inconvenience. If this affects you, email enquiries.Kingstoncountycourt@justice.gov.uk with ''LEVEL ACCESS'' in the subject, and we’ll arrange alternatives.'; +where slug = 'kingston-upon-thames-county-court-and-family-court'; + +UPDATE search_court +SET alert = 'The Chair Lift between the ground floor and the first floor is Out of Order until further notice. This building has a ramp to the building entrance only.' +where slug = 'edmonton-county-court-and-family-court'; + +UPDATE search_court +SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), '&', '&', 'g'); +where slug = 'clerkenwell-and-shoreditch-county-court-and-family-court'; + +UPDATE search_court +SET alert = REGEXP_REPLACE(alert, '<[^>]+>', '', 'g') +where slug in ('east-london-tribunal-hearing-centre','doncaster-justice-centre-south'); + +UPDATE search_court +SET alert_cy = 'Yn dilyn marwolaeth Ei Mawrhydi Y Frenhines, ni fydd y rhan fwyaf o wrandawiadau llys a thribiwnlys yn cael eu cynnal ar 19 Medi 2022, sef diwrnod yr Angladd Wladol. (https://www.gov.uk/government/news/courts-and-tribunals-arrangements-for-the-queens-state-funeral) Rhagor o wybodaeth am drefniadaur llys ar tribiwnlys yn ystod y cyfnod hwn.' +WHERE slug = 'harrogate-justice-centre'; + + + +UPDATE search_servicecentre ss +SET intro_paragraph = REGEXP_REPLACE(intro_paragraph, '<[^>]+>', '', 'g'); -- do first for sc intro paragraph then bit below + +UPDATE search_servicecentre ss +SET intro_paragraph = 'This location serves all of England and Wales for small claims mediation on most defended small claims cases. The service is free and helps resolve money disputes without the need for a court hearing. You can find out more in the guide to the (https://www.gov.uk/guidance/small-claims-mediation-service) Small Claims Mediation Service on GOV.UK. We do not provide an in-person service.' +WHERE court_id = 1480145; + +UPDATE search_servicecentre ss +SET intro_paragraph_cy = 'Mae''r lleoliad hwn yn gwasanaethu Cymru a Lloegr gyfan ar gyfer cyfryngu hawliadau bychain ar y rhan fwyaf o achosion o hawliadau bychain a amddiffynnwyd. Mae''r gwasanaeth yn rhad ac am ddim ac yn helpu i ddatrys anghydfodau ariannol heb fod angen gwrandawiad llys. Gallwch gael rhagor o wybodaeth yn y canllaw ar gyfer (https://www.gov.uk/guidance/small-claims-mediation-service) Gwasanaeth Cyfryngu Hawliadau Bychain ar GOV.UK. Nid ydym yn darparu gwasanaeth wyneb yn wyneb.' +WHERE court_id = 1480145; From 44de3d1d738fbc886a8a0623108698d7959ed3bc Mon Sep 17 00:00:00 2001 From: Imran Date: Thu, 19 Jun 2025 10:08:18 +0100 Subject: [PATCH 02/18] fix --- .../db/migration/V212__mce_datafixes.sql | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/resources/db/migration/V212__mce_datafixes.sql b/src/main/resources/db/migration/V212__mce_datafixes.sql index fb65afa4..f1e65558 100644 --- a/src/main/resources/db/migration/V212__mce_datafixes.sql +++ b/src/main/resources/db/migration/V212__mce_datafixes.sql @@ -35,7 +35,7 @@ SET -- default about 95% of it to the main statement ELSE 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' - end; +end; --UPDATE search_court --SET @@ -111,27 +111,27 @@ SET UPDATE search_court SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), ''', '''', 'g') -where slug in ('barnet-civil-and-family-courts-centre','gateshead-magistrates-court-and-family-court'); +WHERE slug in ('barnet-civil-and-family-courts-centre','gateshead-magistrates-court-and-family-court'); UPDATE search_court SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), '@', '@', 'g') -where slug = 'blackpool-family-and-civil-court'; +WHERE slug = 'blackpool-family-and-civil-court'; UPDATE search_court -SET alert = 'Our lift is out of service, with no level access to courtrooms. We apologise for any inconvenience. If this affects you, email enquiries.Kingstoncountycourt@justice.gov.uk with ''LEVEL ACCESS'' in the subject, and we’ll arrange alternatives.'; -where slug = 'kingston-upon-thames-county-court-and-family-court'; +SET alert = 'Our lift is out of service, with no level access to courtrooms. We apologise for any inconvenience. If this affects you, email enquiries.Kingstoncountycourt@justice.gov.uk with ''LEVEL ACCESS'' in the subject, and we’ll arrange alternatives.' +WHERE slug = 'kingston-upon-thames-county-court-and-family-court'; UPDATE search_court SET alert = 'The Chair Lift between the ground floor and the first floor is Out of Order until further notice. This building has a ramp to the building entrance only.' where slug = 'edmonton-county-court-and-family-court'; UPDATE search_court -SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), '&', '&', 'g'); -where slug = 'clerkenwell-and-shoreditch-county-court-and-family-court'; +SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), '&', '&', 'g') +WHERE slug = 'clerkenwell-and-shoreditch-county-court-and-family-court'; UPDATE search_court SET alert = REGEXP_REPLACE(alert, '<[^>]+>', '', 'g') -where slug in ('east-london-tribunal-hearing-centre','doncaster-justice-centre-south'); +WHERE slug in ('east-london-tribunal-hearing-centre','doncaster-justice-centre-south'); UPDATE search_court SET alert_cy = 'Yn dilyn marwolaeth Ei Mawrhydi Y Frenhines, ni fydd y rhan fwyaf o wrandawiadau llys a thribiwnlys yn cael eu cynnal ar 19 Medi 2022, sef diwrnod yr Angladd Wladol. (https://www.gov.uk/government/news/courts-and-tribunals-arrangements-for-the-queens-state-funeral) Rhagor o wybodaeth am drefniadaur llys ar tribiwnlys yn ystod y cyfnod hwn.' @@ -140,7 +140,9 @@ WHERE slug = 'harrogate-justice-centre'; UPDATE search_servicecentre ss -SET intro_paragraph = REGEXP_REPLACE(intro_paragraph, '<[^>]+>', '', 'g'); -- do first for sc intro paragraph then bit below +SET intro_paragraph = REGEXP_REPLACE(intro_paragraph, '<[^>]+>', '', 'g'); +-- do first for sc intro paragraph then bit below because all the data just has the random tags and no links to keep +-- except the next query UPDATE search_servicecentre ss SET intro_paragraph = 'This location serves all of England and Wales for small claims mediation on most defended small claims cases. The service is free and helps resolve money disputes without the need for a court hearing. You can find out more in the guide to the (https://www.gov.uk/guidance/small-claims-mediation-service) Small Claims Mediation Service on GOV.UK. We do not provide an in-person service.' From 22b6f3b5e8fae974b26ddd5e7823bc5db2e72989 Mon Sep 17 00:00:00 2001 From: Imran Date: Thu, 19 Jun 2025 10:51:34 +0100 Subject: [PATCH 03/18] added more bits, need cy translations now --- .../db/migration/V212__mce_datafixes.sql | 67 ++++++++++++++++--- 1 file changed, 58 insertions(+), 9 deletions(-) diff --git a/src/main/resources/db/migration/V212__mce_datafixes.sql b/src/main/resources/db/migration/V212__mce_datafixes.sql index f1e65558..d9753ed8 100644 --- a/src/main/resources/db/migration/V212__mce_datafixes.sql +++ b/src/main/resources/db/migration/V212__mce_datafixes.sql @@ -111,14 +111,14 @@ end; UPDATE search_court SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), ''', '''', 'g') -WHERE slug in ('barnet-civil-and-family-courts-centre','gateshead-magistrates-court-and-family-court'); +WHERE slug IN ('barnet-civil-and-family-courts-centre','gateshead-magistrates-court-and-family-court'); UPDATE search_court SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), '@', '@', 'g') WHERE slug = 'blackpool-family-and-civil-court'; UPDATE search_court -SET alert = 'Our lift is out of service, with no level access to courtrooms. We apologise for any inconvenience. If this affects you, email enquiries.Kingstoncountycourt@justice.gov.uk with ''LEVEL ACCESS'' in the subject, and we’ll arrange alternatives.' +SET alert = 'Our lift is out of service, with no level access to courtrooms. We apologise for any inconvenience. If this affects you, email enquiries.Kingstoncountycourt@justice.gov.uk with ''LEVEL ACCESS'' in the subject, and we’ll arrange alternatives.' WHERE slug = 'kingston-upon-thames-county-court-and-family-court'; UPDATE search_court @@ -131,7 +131,7 @@ WHERE slug = 'clerkenwell-and-shoreditch-county-court-and-family-court'; UPDATE search_court SET alert = REGEXP_REPLACE(alert, '<[^>]+>', '', 'g') -WHERE slug in ('east-london-tribunal-hearing-centre','doncaster-justice-centre-south'); +WHERE slug IN ('east-london-tribunal-hearing-centre','doncaster-justice-centre-south'); UPDATE search_court SET alert_cy = 'Yn dilyn marwolaeth Ei Mawrhydi Y Frenhines, ni fydd y rhan fwyaf o wrandawiadau llys a thribiwnlys yn cael eu cynnal ar 19 Medi 2022, sef diwrnod yr Angladd Wladol. (https://www.gov.uk/government/news/courts-and-tribunals-arrangements-for-the-queens-state-funeral) Rhagor o wybodaeth am drefniadaur llys ar tribiwnlys yn ystod y cyfnod hwn.' @@ -139,15 +139,64 @@ WHERE slug = 'harrogate-justice-centre'; -UPDATE search_servicecentre ss -SET intro_paragraph = REGEXP_REPLACE(intro_paragraph, '<[^>]+>', '', 'g'); --- do first for sc intro paragraph then bit below because all the data just has the random tags and no links to keep --- except the next query +UPDATE search_servicecentre +SET intro_paragraph = REGEXP_REPLACE(intro_paragraph, '<[^>]+>', '', 'g'); -- do first for sc intro paragraph then bit below -UPDATE search_servicecentre ss +UPDATE search_servicecentre SET intro_paragraph = 'This location serves all of England and Wales for small claims mediation on most defended small claims cases. The service is free and helps resolve money disputes without the need for a court hearing. You can find out more in the guide to the (https://www.gov.uk/guidance/small-claims-mediation-service) Small Claims Mediation Service on GOV.UK. We do not provide an in-person service.' WHERE court_id = 1480145; -UPDATE search_servicecentre ss +UPDATE search_servicecentre SET intro_paragraph_cy = 'Mae''r lleoliad hwn yn gwasanaethu Cymru a Lloegr gyfan ar gyfer cyfryngu hawliadau bychain ar y rhan fwyaf o achosion o hawliadau bychain a amddiffynnwyd. Mae''r gwasanaeth yn rhad ac am ddim ac yn helpu i ddatrys anghydfodau ariannol heb fod angen gwrandawiad llys. Gallwch gael rhagor o wybodaeth yn y canllaw ar gyfer (https://www.gov.uk/guidance/small-claims-mediation-service) Gwasanaeth Cyfryngu Hawliadau Bychain ar GOV.UK. Nid ydym yn darparu gwasanaeth wyneb yn wyneb.' WHERE court_id = 1480145; + + +UPDATE search_facility +SET description = REGEXP_REPLACE(description, '<[^>]+>', '', 'g'); +UPDATE search_facility +SET description_cy = REGEXP_REPLACE(description_cy, '<[^>]+>', '', 'g'); + +UPDATE search_facility +SET description = REGEXP_REPLACE(description, ' ', ' ', 'g'); +UPDATE search_facility +SET description_cy = REGEXP_REPLACE(description_cy, ' ', ' ', 'g'); + +UPDATE search_facility +SET description = REGEXP_REPLACE(description, '&', '&', 'g'); +UPDATE search_facility +SET description_cy = REGEXP_REPLACE(description_cy, '&', '&', 'g'); + +UPDATE search_facility +SET description = REGEXP_REPLACE(description, ''', '''', 'g'); +UPDATE search_facility +SET description_cy = REGEXP_REPLACE(description_cy, ''', '''', 'g'); + +UPDATE search_facility +SET description = REGEXP_REPLACE(description, '–', '–', 'g'); +UPDATE search_facility +SET description_cy = REGEXP_REPLACE(description_cy, '–', '–', 'g'); + +UPDATE search_facility +SET description = REGEXP_REPLACE(description, '‘', '''', 'g'); +UPDATE search_facility +SET description_cy = REGEXP_REPLACE(description_cy, '‘', '''', 'g'); + +UPDATE search_facility +SET description = REGEXP_REPLACE(description, 'é', 'é', 'g'); +UPDATE search_facility +SET description_cy = REGEXP_REPLACE(description_cy, 'é', 'é', 'g'); + +UPDATE search_facility +SET description = REGEXP_REPLACE(description, '·', '·', 'g'); +UPDATE search_facility +SET description_cy = REGEXP_REPLACE(description_cy, '·', '·', 'g'); + +UPDATE search_facility +SET description = REGEXP_REPLACE(description, '@', '@', 'g'); +UPDATE search_facility +SET description_cy = REGEXP_REPLACE(description_cy, '@', '@', 'g'); + +UPDATE search_facility +SET description = REGEXP_REPLACE(description, '’', '''', 'g'); +UPDATE search_facility +SET description_cy = REGEXP_REPLACE(description_cy, '’', '''', 'g'); From 650efccaf4567e4ac16f744444b7719429e82c64 Mon Sep 17 00:00:00 2001 From: Imran Date: Thu, 19 Jun 2025 12:38:19 +0100 Subject: [PATCH 04/18] poke --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 0ed2ffe5..d1b9ef5d 100644 --- a/README.md +++ b/README.md @@ -126,4 +126,3 @@ Then try restarting the application to build the api. ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details - From 9b5d1e73e564cb37ca0438e151a5969a45317e42 Mon Sep 17 00:00:00 2001 From: Imran Date: Tue, 24 Jun 2025 14:29:43 +0100 Subject: [PATCH 05/18] datafix - need welsh still --- .../db/migration/V212__mce_datafixes.sql | 122 +++++++++--------- 1 file changed, 63 insertions(+), 59 deletions(-) diff --git a/src/main/resources/db/migration/V212__mce_datafixes.sql b/src/main/resources/db/migration/V212__mce_datafixes.sql index d9753ed8..d3bb3927 100644 --- a/src/main/resources/db/migration/V212__mce_datafixes.sql +++ b/src/main/resources/db/migration/V212__mce_datafixes.sql @@ -1,41 +1,43 @@ + UPDATE search_court SET - info = - case - WHEN slug = 'old-2-traffic-enforcement-centre-tec' - THEN 'Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' + info = + case + + WHEN slug = 'old-2-traffic-enforcement-centre-tec' + THEN 'Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' - WHEN slug = 'clerkenwell-and-shoreditch-county-court-and-family-court' - THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Court Fees. If unsure about your Court Fee, please see EX50: Fees in the civil and family courts – main fees (EX50) - GOV.UK (https://www.gov.uk/government/publications/fees-in-the-civil-and-family-courts-main-fees-ex50). If you think you qualify for Help with Fees, please see EX160A: How to apply for help with fees: EX160A - GOV.UK (https://www.gov.uk/government/publications/apply-for-help-with-court-and-tribunal-fees/how-to-apply-for-help-with-fees-ex160a-for-applications-made-or-fees-paid-on-or-after-27-november-2023). Please make sure your application / documents / paperwork is submitted with the payment method. Please note, if you have requested to be called to collect a court fee, the call will come from an unknown number. Cheques / Postal Orders (made payable to ‘HMCTS’). Post to the Court or place in the Drop Box with the relevant paperwork. Card Payments. Post to the Court, place in the Drop Box, or Email the Court your contact details, with the relevant paperwork. Alternatively, telephone the Enquiries line. A handoff will be sent to the Court, and you will be contacted by us.' + WHEN slug = 'clerkenwell-and-shoreditch-county-court-and-family-court' + THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Court Fees. If unsure about your Court Fee, please see EX50: Fees in the civil and family courts – main fees (EX50) - GOV.UK (https://www.gov.uk/government/publications/fees-in-the-civil-and-family-courts-main-fees-ex50). If you think you qualify for Help with Fees, please see EX160A: How to apply for help with fees: EX160A - GOV.UK (https://www.gov.uk/government/publications/apply-for-help-with-court-and-tribunal-fees/how-to-apply-for-help-with-fees-ex160a-for-applications-made-or-fees-paid-on-or-after-27-november-2023). Please make sure your application / documents / paperwork is submitted with the payment method. Please note, if you have requested to be called to collect a court fee, the call will come from an unknown number. Cheques / Postal Orders (made payable to ‘HMCTS’). Post to the Court or place in the Drop Box with the relevant paperwork. Card Payments. Post to the Court, place in the Drop Box, or Email the Court your contact details, with the relevant paperwork. Alternatively, telephone the Enquiries line. A handoff will be sent to the Court, and you will be contacted by us.' - WHEN slug = 'central-family-court' - THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). For urgent without notice applications, e.g. non-molestation orders and prohibited steps orders please contact cfc.urgentapplications@justice.gov.uk' + WHEN slug = 'central-family-court' + THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). For urgent without notice applications, e.g. non-molestation orders and prohibited steps orders please contact cfc.urgentapplications@justice.gov.uk' - WHEN slug = 'barnet-civil-and-family-courts-centre' - THEN 'Cases will be heard at alternative venues to minimise disruption, please check your hearing notice or the daily court list (https://www.courtserve.net/courtlists/current/county/indexv2county.php) for more info. If you have a case at Barnet, please write to us at: 9 Acton Lane, Harlesden, London, NW10 8SB. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' + WHEN slug = 'barnet-civil-and-family-courts-centre' + THEN 'Cases will be heard at alternative venues to minimise disruption, please check your hearing notice or the daily court list (https://www.courtserve.net/courtlists/current/county/indexv2county.php) for more info. If you have a case at Barnet, please write to us at: 9 Acton Lane, Harlesden, London, NW10 8SB. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' - WHEN slug = 'romford-social-security-and-child-support' - THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Romford Magistrates'' Court (formerly Havering Magistrates'' Court). Access to Social Security Tribunals. The entrance to the Tribunal Service is separate to the Magistrates Court entrance. Access is via the car park on the left-hand side of the Magistrates court. Please enter the car park and keep to the right side. You will see a Tribunal service sign on the entrance door. If you attempt to enter the Magistrates court entrance, you will be sent back around to the side of the building to enter via the SSCS Tribunal Service door.' + WHEN slug = 'romford-social-security-and-child-support' + THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Romford Magistrates'' Court (formerly Havering Magistrates'' Court). Access to Social Security Tribunals. The entrance to the Tribunal Service is separate to the Magistrates Court entrance. Access is via the car park on the left-hand side of the Magistrates court. Please enter the car park and keep to the right side. You will see a Tribunal service sign on the entrance door. If you attempt to enter the Magistrates court entrance, you will be sent back around to the side of the building to enter via the SSCS Tribunal Service door.' - WHEN slug = 'traffic-enforcement-centre-tec' - THEN 'Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). DX code: 702885 Northampton 7. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' + WHEN slug = 'traffic-enforcement-centre-tec' + THEN 'Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). DX code: 702885 Northampton 7. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' - WHEN slug = 'traffic-enforcement-centre-tec-old' - THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' + WHEN slug = 'traffic-enforcement-centre-tec-old' + THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' - WHEN slug = 'northampton-crown-county-and-family-court' - THEN 'The Civil National Business Centre (formerly CCBC) is also in Northampton and is an entirely separate entity to Northampton Crown, County and Family Court. Northampton County and Family Court cannot answer queries on behalf of CNBC. Follow link (https://www.find-court-tribunal.service.gov.uk/courts/county-court-business-centre-ccbc). Opening times - Monday to Friday 08:30 to 17:00. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' + WHEN slug = 'northampton-crown-county-and-family-court' + THEN 'The Civil National Business Centre (formerly CCBC) is also in Northampton and is an entirely separate entity to Northampton Crown, County and Family Court. Northampton County and Family Court cannot answer queries on behalf of CNBC. Follow link (https://www.find-court-tribunal.service.gov.uk/courts/county-court-business-centre-ccbc). Opening times - Monday to Friday 08:30 to 17:00. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' - WHEN slug = 'civil-national-business-centre-cnbc' - THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). To enable us to better direct your contact please use our Signposting Tool (https://civil-national-business-centre-cnbc.form.service.justice.gov.uk/). Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc).' + WHEN slug = 'civil-national-business-centre-cnbc' + THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). To enable us to better direct your contact please use our Signposting Tool (https://civil-national-business-centre-cnbc.form.service.justice.gov.uk/). Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc).' - -- if not set then leave it blank - WHEN info = '' or info is null - THEN '' + -- if not set then leave it blank + WHEN info = '' or info is null + THEN '' - -- default about 95% of it to the main statement - ELSE 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' -end; + -- default about 95% of it to the main statement + ELSE 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' + end; --UPDATE search_court --SET @@ -78,15 +80,10 @@ end; -- -- -- default about 95% of it to the main statement -- ELSE 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' --- - -- end; - - - -- Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). -- -- Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). @@ -111,15 +108,15 @@ end; UPDATE search_court SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), ''', '''', 'g') -WHERE slug IN ('barnet-civil-and-family-courts-centre','gateshead-magistrates-court-and-family-court'); +where slug in ('barnet-civil-and-family-courts-centre','gateshead-magistrates-court-and-family-court'); UPDATE search_court SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), '@', '@', 'g') -WHERE slug = 'blackpool-family-and-civil-court'; +where slug = 'blackpool-family-and-civil-court'; UPDATE search_court SET alert = 'Our lift is out of service, with no level access to courtrooms. We apologise for any inconvenience. If this affects you, email enquiries.Kingstoncountycourt@justice.gov.uk with ''LEVEL ACCESS'' in the subject, and we’ll arrange alternatives.' -WHERE slug = 'kingston-upon-thames-county-court-and-family-court'; +where slug = 'kingston-upon-thames-county-court-and-family-court'; UPDATE search_court SET alert = 'The Chair Lift between the ground floor and the first floor is Out of Order until further notice. This building has a ramp to the building entrance only.' @@ -127,11 +124,11 @@ where slug = 'edmonton-county-court-and-family-court'; UPDATE search_court SET alert = REGEXP_REPLACE(REGEXP_REPLACE(alert, '<[^>]+>', '', 'g'), '&', '&', 'g') -WHERE slug = 'clerkenwell-and-shoreditch-county-court-and-family-court'; +where slug = 'clerkenwell-and-shoreditch-county-court-and-family-court'; UPDATE search_court SET alert = REGEXP_REPLACE(alert, '<[^>]+>', '', 'g') -WHERE slug IN ('east-london-tribunal-hearing-centre','doncaster-justice-centre-south'); +where slug in ('east-london-tribunal-hearing-centre','doncaster-justice-centre-south'); UPDATE search_court SET alert_cy = 'Yn dilyn marwolaeth Ei Mawrhydi Y Frenhines, ni fydd y rhan fwyaf o wrandawiadau llys a thribiwnlys yn cael eu cynnal ar 19 Medi 2022, sef diwrnod yr Angladd Wladol. (https://www.gov.uk/government/news/courts-and-tribunals-arrangements-for-the-queens-state-funeral) Rhagor o wybodaeth am drefniadaur llys ar tribiwnlys yn ystod y cyfnod hwn.' @@ -139,64 +136,71 @@ WHERE slug = 'harrogate-justice-centre'; -UPDATE search_servicecentre +UPDATE search_servicecentre ss SET intro_paragraph = REGEXP_REPLACE(intro_paragraph, '<[^>]+>', '', 'g'); -- do first for sc intro paragraph then bit below -UPDATE search_servicecentre +UPDATE search_servicecentre ss SET intro_paragraph = 'This location serves all of England and Wales for small claims mediation on most defended small claims cases. The service is free and helps resolve money disputes without the need for a court hearing. You can find out more in the guide to the (https://www.gov.uk/guidance/small-claims-mediation-service) Small Claims Mediation Service on GOV.UK. We do not provide an in-person service.' WHERE court_id = 1480145; -UPDATE search_servicecentre +UPDATE search_servicecentre ss SET intro_paragraph_cy = 'Mae''r lleoliad hwn yn gwasanaethu Cymru a Lloegr gyfan ar gyfer cyfryngu hawliadau bychain ar y rhan fwyaf o achosion o hawliadau bychain a amddiffynnwyd. Mae''r gwasanaeth yn rhad ac am ddim ac yn helpu i ddatrys anghydfodau ariannol heb fod angen gwrandawiad llys. Gallwch gael rhagor o wybodaeth yn y canllaw ar gyfer (https://www.gov.uk/guidance/small-claims-mediation-service) Gwasanaeth Cyfryngu Hawliadau Bychain ar GOV.UK. Nid ydym yn darparu gwasanaeth wyneb yn wyneb.' WHERE court_id = 1480145; -UPDATE search_facility + +UPDATE search_facility ss SET description = REGEXP_REPLACE(description, '<[^>]+>', '', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, '<[^>]+>', '', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description = REGEXP_REPLACE(description, ' ', ' ', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, ' ', ' ', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description = REGEXP_REPLACE(description, '&', '&', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, '&', '&', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description = REGEXP_REPLACE(description, ''', '''', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, ''', '''', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description = REGEXP_REPLACE(description, '–', '–', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, '–', '–', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description = REGEXP_REPLACE(description, '‘', '''', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, '‘', '''', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description = REGEXP_REPLACE(description, 'é', 'é', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, 'é', 'é', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description = REGEXP_REPLACE(description, '·', '·', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, '·', '·', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description = REGEXP_REPLACE(description, '@', '@', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, '@', '@', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description = REGEXP_REPLACE(description, '’', '''', 'g'); -UPDATE search_facility +UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, '’', '''', 'g'); + +UPDATE search_facility ss +SET description = REGEXP_REPLACE(description, 'â', 'â', 'g'); +UPDATE search_facility ss +SET description_cy = REGEXP_REPLACE(description_cy, 'â', 'â', 'g'); + From 71623b6d93652407c386b13745126ddc671b40eb Mon Sep 17 00:00:00 2001 From: Imran Date: Thu, 26 Jun 2025 09:29:01 +0100 Subject: [PATCH 06/18] added welsh translation to datafix --- .../db/migration/V212__mce_datafixes.sql | 109 +++++++----------- 1 file changed, 41 insertions(+), 68 deletions(-) diff --git a/src/main/resources/db/migration/V212__mce_datafixes.sql b/src/main/resources/db/migration/V212__mce_datafixes.sql index d3bb3927..34a6c3bd 100644 --- a/src/main/resources/db/migration/V212__mce_datafixes.sql +++ b/src/main/resources/db/migration/V212__mce_datafixes.sql @@ -37,73 +37,47 @@ SET -- default about 95% of it to the main statement ELSE 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' - end; - ---UPDATE search_court ---SET --- info_cy = --- case - --- need to get welsh translation fixes - --- --- WHEN slug = 'old-2-traffic-enforcement-centre-tec' --- THEN 'Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' --- --- WHEN slug = 'clerkenwell-and-shoreditch-county-court-and-family-court' --- THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Court Fees. If unsure about your Court Fee, please see EX50: Fees in the civil and family courts – main fees (EX50) - GOV.UK (https://www.gov.uk/government/publications/fees-in-the-civil-and-family-courts-main-fees-ex50). If you think you qualify for Help with Fees, please see EX160A: How to apply for help with fees: EX160A - GOV.UK (https://www.gov.uk/government/publications/apply-for-help-with-court-and-tribunal-fees/how-to-apply-for-help-with-fees-ex160a-for-applications-made-or-fees-paid-on-or-after-27-november-2023). Please make sure your application / documents / paperwork is submitted with the payment method. Please note, if you have requested to be called to collect a court fee, the call will come from an unknown number. Cheques / Postal Orders (made payable to ‘HMCTS’). Post to the Court or place in the Drop Box with the relevant paperwork. Card Payments. Post to the Court, place in the Drop Box, or Email the Court your contact details, with the relevant paperwork. Alternatively, telephone the Enquiries line. A handoff will be sent to the Court, and you will be contacted by us.' --- --- WHEN slug = 'central-family-court' --- THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). For urgent without notice applications, e.g. non-molestation orders and prohibited steps orders please contact cfc.urgentapplications@justice.gov.uk' --- --- WHEN slug = 'barnet-civil-and-family-courts-centre' --- THEN 'Cases will be heard at alternative venues to minimise disruption, please check your hearing notice or the daily court list (https://www.courtserve.net/courtlists/current/county/indexv2county.php) for more info. If you have a case at Barnet, please write to us at: 9 Acton Lane, Harlesden, London, NW10 8SB. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' --- --- WHEN slug = 'romford-social-security-and-child-support' --- THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Romford Magistrates'' Court (formerly Havering Magistrates'' Court). Access to Social Security Tribunals. The entrance to the Tribunal Service is separate to the Magistrates Court entrance. Access is via the car park on the left-hand side of the Magistrates court. Please enter the car park and keep to the right side. You will see a Tribunal service sign on the entrance door. If you attempt to enter the Magistrates court entrance, you will be sent back around to the side of the building to enter via the SSCS Tribunal Service door.' --- --- WHEN slug = 'traffic-enforcement-centre-tec' --- THEN 'Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). DX code: 702885 Northampton 7. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' --- --- WHEN slug = 'traffic-enforcement-centre-tec-old' --- THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' --- --- WHEN slug = 'northampton-crown-county-and-family-court' --- THEN 'The Civil National Business Centre (formerly CCBC) is also in Northampton and is an entirely separate entity to Northampton Crown, County and Family Court. Northampton County and Family Court cannot answer queries on behalf of CNBC. Follow link (https://www.find-court-tribunal.service.gov.uk/courts/county-court-business-centre-ccbc). Opening times - Monday to Friday 08:30 to 17:00. Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' --- --- WHEN slug = 'civil-national-business-centre-cnbc' --- THEN 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). To enable us to better direct your contact please use our Signposting Tool (https://civil-national-business-centre-cnbc.form.service.justice.gov.uk/). Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc).' --- --- -- if not set then leave it blank --- WHEN info_cy = '' or info_cy is null --- THEN '' --- --- -- default about 95% of it to the main statement --- ELSE 'Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/).' --- end; - - - --- Scammers are mimicking genuine HMCTS phone numbers and email addresses (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). They may demand payment and claim to be from HMRC or enforcement. If you''re unsure, do not pay anything and report the scam to Action Fraud (https://www.actionfraud.police.uk/). --- --- Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). --- --- If unsure about your Court Fee, please see EX50: Fees in the civil and family courts – main fees (EX50) - GOV.UK (https://www.gov.uk/government/publications/fees-in-the-civil-and-family-courts-main-fees-ex50). If you think you qualify for Help with Fees, please see EX160A: How to apply for help with fees: EX160A - GOV.UK (https://www.gov.uk/government/publications/apply-for-help-with-court-and-tribunal-fees/how-to-apply-for-help-with-fees-ex160a-for-applications-made-or-fees-paid-on-or-after-27-november-2023). Please make sure your application / documents / paperwork is submitted with the payment method. Please note, if you have requested to be called to collect a court fee, the call will come from an unknown number. Cheques / Postal Orders (made payable to ‘HMCTS’). Post to the Court or place in the Drop Box with the relevant paperwork. for card payments, post it to the court, place it in the drop box, or email the court your contact details, with the relevant paperwork. Alternatively, telephone the enquiries line. A handoff will be sent to the court, and you will be contacted by us. --- --- For urgent without notice applications, e.g. non-molestation orders and prohibited steps orders please contact cfc.urgentapplications@justice.gov.uk --- --- Cases will be heard at alternative venues to minimise disruption, please check your hearing notice or the daily court list (https://www.courtserve.net/courtlists/current/county/indexv2county.php) for more info. If you have a case at Barnet, please write to us at: 9 Acton Lane, Harlesden, London, NW10 8SB. --- --- Romford Magistrates' Court (formerly Havering Magistrates' Court). Access to Social Security Tribunals. The entrance to the Tribunal Service is separate to the Magistrates Court entrance. Access is via the car park on the left-hand side of the Magistrates court. Please enter the car park and keep to the right side. You will see a Tribunal service sign on the entrance door. If you attempt to enter the Magistrates court entrance, you will be sent back around to the side of the building to enter via the SSCS Tribunal Service door. --- --- DX code: 702885 Northampton 7. --- --- Appeal against a penalty charge notice: If you get a court order (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order). --- --- The Civil National Business Centre (formerly CCBC) is also in Northampton and is an entirely separate entity to Northampton Crown, County and Family Court. Northampton County and Family Court cannot answer queries on behalf of CNBC. Follow link (https://www.find-court-tribunal.service.gov.uk/courts/county-court-business-centre-ccbc). Opening times - Monday to Friday 08:30 to 17:00. --- --- To enable us to better direct your contact please use our Signposting Tool (https://civil-national-business-centre-cnbc.form.service.justice.gov.uk/). Please use this link for our webchat facility (https://www.moneyclaims.service.gov.uk/contact-cnbc). --- +end; + +UPDATE search_court +SET + info_cy = + case + + WHEN slug = 'old-2-traffic-enforcement-centre-tec' + THEN 'Defnyddiwch y ddolen hon ar gyfer ein cyfleuster sgwrsio dros y we (https://www.moneyclaims.service.gov.uk/contact-cnbc). Mae sgamwyr yn dynwared rhifau ffôn a chyfeiriadau e-bost swyddogol GLlTEF (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). Gallant fynnu taliad a honni eu bod nhw o Gyllid a Thollau EF (HMRC) neu o''r adran gorfodi. Os ydych yn ansicr, peidiwch â gwneud unrhyw daliad, a dylech adrodd am y sgam i Action Fraud (https://www.actionfraud.police.uk/).' + + WHEN slug = 'clerkenwell-and-shoreditch-county-court-and-family-court' + THEN 'Mae sgamwyr yn dynwared rhifau ffôn a chyfeiriadau e-bost swyddogol GLlTEF (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). Gallant fynnu taliad a honni eu bod nhw o Gyllid a Thollau EF (HMRC) neu o''r adran gorfodi. Os ydych yn ansicr, peidiwch â gwneud unrhyw daliad, a dylech adrodd am y sgam i Action Fraud (https://www.actionfraud.police.uk/). Os ydych yn ansicr am eich Ffi Llys, gweler EX50: Ffioedd yn y llysoedd sifil a theulu - prif ffioedd (EX50)- GOV.UK (https://www.gov.uk/government/publications/fees-in-the-civil-and-family-courts-main-fees-ex50). Os ydych yn meddwl eich bod gymwys i gael Help i Dalu Ffioedd, gweler EX160A: Sut i wneud cais am help i dalu ffioedd: EX160A - GOV.UK (https://www.gov.uk/government/publications/apply-for-help-with-court-and-tribunal-fees/how-to-apply-for-help-with-fees-ex160a-for-applications-made-or-fees-paid-on-or-after-27-november-2023). Gwnewch yn siŵr bod eich cais / dogfennau / gwaith papur yn cael ei gyflwyno gyda’r dull talu. Dalier sylw, os ydych wedi gwneud cais am alwad ffôn i gasglu ffi llys, bydd yr alwad yn dod o rif anhysbys. Sieciau / Archebion Post (yn daladwy i ‘GLlTEF’). Postio i’r Llys neu eu rhoi yn y Blwch gyda’r gwaith papur perthnasol. Ar gyfer taliadau gyda cherdyn, ei bostio i’r llys, eu rhoi yn y blwch, neu anfon e-bost i’r llys gyda’ch manylion cyswllt, gyda’r gwaith papur perthnasol. Fel arall, ffoniwch y llinell ymholiadau. Bydd y gwaith papur yn cael ei anfon i’r llys, a byddwn yn cysylltu â chi.' + + WHEN slug = 'central-family-court' + THEN 'Mae sgamwyr yn dynwared rhifau ffôn a chyfeiriadau e-bost swyddogol GLlTEF (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). Gallant fynnu taliad a honni eu bod nhw o Gyllid a Thollau EF (HMRC) neu o''r adran gorfodi. Os ydych yn ansicr, peidiwch â gwneud unrhyw daliad, a dylech adrodd am y sgam i Action Fraud (https://www.actionfraud.police.uk/). Ar gyfer ceisiadau brys heb rybudd, e.e. gorchmynion rhag molestu a gorchmynion camau gwaharddedig, cysylltwch â cfc.urgentapplications@justice.gov.uk' + + WHEN slug = 'barnet-civil-and-family-courts-centre' + THEN 'Bydd achosion yn cael eu gwrando mewn lleoliadau amgen i leihau unrhyw oedi, gwiriwch eich hysbysiad o wrandawiad neu restr achosion dyddiol y llys (https://www.courtserve.net/courtlists/current/county/indexv2county.php) i gael mwy o wybodaeth. Os oes gennych achos yn Barnet, ysgrifennwch atom yn: 9 Acton Lane, Harlesden, Llundain / London, NW10 8SB. Mae sgamwyr yn dynwared rhifau ffôn a chyfeiriadau e-bost swyddogol GLlTEF (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). Gallant fynnu taliad a honni eu bod nhw o Gyllid a Thollau EF (HMRC) neu o''r adran gorfodi. Os ydych yn ansicr, peidiwch â gwneud unrhyw daliad, a dylech adrodd am y sgam i Action Fraud (https://www.actionfraud.police.uk/).' + + WHEN slug = 'romford-social-security-and-child-support' + THEN 'Mae sgamwyr yn dynwared rhifau ffôn a chyfeiriadau e-bost swyddogol GLlTEF (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). Gallant fynnu taliad a honni eu bod nhw o Gyllid a Thollau EF (HMRC) neu o''r adran gorfodi. Os ydych yn ansicr, peidiwch â gwneud unrhyw daliad, a dylech adrodd am y sgam i Action Fraud (https://www.actionfraud.police.uk/). Llys Ynadon Romford (Llys Ynadon Havering gynt). Mynediad at y Tribiwnlysoedd Nawdd Cymdeithasol. Mae’r fynedfa i’r Gwasanaeth Tribiwnlys ar wahân i fynedfa’r Llys Ynadon. Cewch fynediad drwy’r maes parcio ar ochr chwith y Llys Ynadon. Dewch i mewn i’r maes parcio a chadw at yr ochr dde. Fe welwch arwydd gwasanaeth Tribiwnlys ar ddrws y fynedfa. Os ydych yn ceisio dod drwy fynedfa’r llys ynadon, byddwch yn cael eich anfon yn ôl i ochr yr adeilad i fynd i mewn trwy ddrws y Gwasanaeth Tribiwnlys.' + + WHEN slug = 'traffic-enforcement-centre-tec' + THEN 'Defnyddiwch y ddolen hon ar gyfer ein cyfleuster sgwrsio dros y we (https://www.moneyclaims.service.gov.uk/contact-cnbc). DX code: 702885 Northampton 7. Mae sgamwyr yn dynwared rhifau ffôn a chyfeiriadau e-bost swyddogol GLlTEF (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). Gallant fynnu taliad a honni eu bod nhw o Gyllid a Thollau EF (HMRC) neu o''r adran gorfodi. Os ydych yn ansicr, peidiwch â gwneud unrhyw daliad, a dylech adrodd am y sgam i Action Fraud (https://www.actionfraud.police.uk/). Apelio yn erbyn hysbysiad o gosb ariannol: Os cewch orchymyn llys (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' + + WHEN slug = 'traffic-enforcement-centre-tec-old' + THEN 'Mae sgamwyr yn dynwared rhifau ffôn a chyfeiriadau e-bost swyddogol GLlTEF (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). Gallant fynnu taliad a honni eu bod nhw o Gyllid a Thollau EF (HMRC) neu o''r adran gorfodi. Os ydych yn ansicr, peidiwch â gwneud unrhyw daliad, a dylech adrodd am y sgam i Action Fraud (https://www.actionfraud.police.uk/). Apelio yn erbyn hysbysiad o gosb ariannol: Os cewch orchymyn llys (https://www.gov.uk/appeal-against-a-penalty-charge-notice/court-order).' + + WHEN slug = 'northampton-crown-county-and-family-court' + THEN 'Mae’r Ganolfan Fusnes Sifil Cenedlaethol (CCBC gynt) hefyd yn Northampton, ac mae’n gwbl ar wahân i Lys y Goron Northampton a llysoedd Sirol a Theulu Northampton. Ni alla Llysoedd Sifil a Theulu Northampton ymateb i ymholiadau ar ran y Ganolfan Fusnes. Dilynwch y ddolen (https://www.find-court-tribunal.service.gov.uk/courts/county-court-business-centre-ccbc). Oriau agor - dydd Llun i ddydd Gwener, 08:30 - 17:00. Mae sgamwyr yn dynwared rhifau ffôn a chyfeiriadau e-bost swyddogol GLlTEF (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). Gallant fynnu taliad a honni eu bod nhw o Gyllid a Thollau EF (HMRC) neu o''r adran gorfodi. Os ydych yn ansicr, peidiwch â gwneud unrhyw daliad, a dylech adrodd am y sgam i Action Fraud (https://www.actionfraud.police.uk/).' + + WHEN slug = 'civil-national-business-centre-cnbc' + THEN 'Mae sgamwyr yn dynwared rhifau ffôn a chyfeiriadau e-bost swyddogol GLlTEF (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). Gallant fynnu taliad a honni eu bod nhw o Gyllid a Thollau EF (HMRC) neu o''r adran gorfodi. Os ydych yn ansicr, peidiwch â gwneud unrhyw daliad, a dylech adrodd am y sgam i Action Fraud (https://www.actionfraud.police.uk/). I’n galluogi i’ch cyfeirio yn well i’r lle cywir, defnyddiwch ein Hadnodd Cyfeirio (https://civil-national-business-centre-cnbc.form.service.justice.gov.uk/). Defnyddiwch y ddolen hon ar gyfer ein cyfleuster sgwrsio dros y we (https://www.moneyclaims.service.gov.uk/contact-cnbc).' + + -- if not set then leave it blank + WHEN info_cy = '' or info_cy is null + THEN '' + + -- default about 95% of it to the main statement + ELSE 'Mae sgamwyr yn dynwared rhifau ffôn a chyfeiriadau e-bost swyddogol GLlTEF (https://www.gov.uk/government/news/scammers-using-hmcts-telephone-numbers). Gallant fynnu taliad a honni eu bod nhw o Gyllid a Thollau EF (HMRC) neu o''r adran gorfodi. Os ydych yn ansicr, peidiwch â gwneud unrhyw daliad, a dylech adrodd am y sgam i Action Fraud (https://www.actionfraud.police.uk/).' +end; UPDATE search_court @@ -203,4 +177,3 @@ UPDATE search_facility ss SET description = REGEXP_REPLACE(description, 'â', 'â', 'g'); UPDATE search_facility ss SET description_cy = REGEXP_REPLACE(description_cy, 'â', 'â', 'g'); - From 32f34e3bd27209e2ac3976738b69de46609a2d7e Mon Sep 17 00:00:00 2001 From: Imran Date: Thu, 26 Jun 2025 09:55:46 +0100 Subject: [PATCH 07/18] altered integration test --- ...lesbury-magistrates-court-and-family-court.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/integrationTest/resources/deprecated/aylesbury-magistrates-court-and-family-court.json b/src/integrationTest/resources/deprecated/aylesbury-magistrates-court-and-family-court.json index 6be7e92c..9bf7c825 100644 --- a/src/integrationTest/resources/deprecated/aylesbury-magistrates-court-and-family-court.json +++ b/src/integrationTest/resources/deprecated/aylesbury-magistrates-court-and-family-court.json @@ -62,31 +62,31 @@ ], "facilities": [ { - "description": "

Assistance dogs are welcome.

", + "description": "Assistance dogs are welcome.", "name": "Assistance dogs" }, { - "description": "

The car park is unavailable for public access.

\r\n

 

", + "description": "The car park is unavailable for public access.\r\n ", "name": "Parking" }, { - "description": "

4 interview rooms are available on the ground floor

", + "description": "4 interview rooms are available on the ground floor", "name": "Interview room" }, { - "description": "

The building has hearing enhancement facilities available by prior arrangement.  Please contact the Court office by telephone or email if necessary.

", + "description": "The building has hearing enhancement facilities available by prior arrangement. Please contact the Court office by telephone or email if necessary.", "name": "Hearing Loop" }, { - "description": "

Baby changing facilities are available in the disabled toilets on the ground floor

\r\n

 

", + "description": "Baby changing facilities are available in the disabled toilets on the ground floor\r\n ", "name": "Baby changing facility" }, { - "description": "

This building has level access to the building entrance, and court room.

\r\n

 

", + "description": "This building has level access to the building entrance, and court room.\r\n ", "name": "Disabled access" }, { - "description": "

Video conference facilities excluding prison to court video links

", + "description": "Video conference facilities excluding prison to court video links", "name": "Video facilities" }, { From e1e9e32ed8b00d66b8e7a7a6ec775c67884c1630 Mon Sep 17 00:00:00 2001 From: Imran Date: Thu, 26 Jun 2025 16:25:17 +0100 Subject: [PATCH 08/18] fix the owasp sanitizer --- .../hmcts/dts/fact/html/sanitizer/OwaspHtmlSanitizer.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/dts/fact/html/sanitizer/OwaspHtmlSanitizer.java b/src/main/java/uk/gov/hmcts/dts/fact/html/sanitizer/OwaspHtmlSanitizer.java index aeb5ca77..123eaef2 100644 --- a/src/main/java/uk/gov/hmcts/dts/fact/html/sanitizer/OwaspHtmlSanitizer.java +++ b/src/main/java/uk/gov/hmcts/dts/fact/html/sanitizer/OwaspHtmlSanitizer.java @@ -15,12 +15,7 @@ private OwaspHtmlSanitizer() { * @return the sanitized HTML string */ public static String sanitizeHtml(String untrustedHtml) { - PolicyFactory policy = new HtmlPolicyBuilder() - .allowElements("a", "strong", "em") - .allowUrlProtocols("https", "mailto") - .allowAttributes("href").onElements("a") - .requireRelNofollowOnLinks() - .toFactory(); + PolicyFactory policy = new HtmlPolicyBuilder().toFactory(); return policy.sanitize(untrustedHtml); } } From 8d43542d26bd042833a9dabe3460fb18fb6cc9f7 Mon Sep 17 00:00:00 2001 From: Imran Date: Thu, 26 Jun 2025 16:26:46 +0100 Subject: [PATCH 09/18] fixed unit test --- .../hmcts/dts/fact/html/sanitzer/OwaspHtmlSanitizerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/uk/gov/hmcts/dts/fact/html/sanitzer/OwaspHtmlSanitizerTest.java b/src/test/java/uk/gov/hmcts/dts/fact/html/sanitzer/OwaspHtmlSanitizerTest.java index 449887d6..04311da4 100644 --- a/src/test/java/uk/gov/hmcts/dts/fact/html/sanitzer/OwaspHtmlSanitizerTest.java +++ b/src/test/java/uk/gov/hmcts/dts/fact/html/sanitzer/OwaspHtmlSanitizerTest.java @@ -13,6 +13,6 @@ void shouldSanitizeHtml() { assertThat(sanitizeHtml("

urgent notice https://www.google.com

")) .isEqualTo("urgent notice https://www.google.com"); assertThat(sanitizeHtml("

urgent notice bold

")) - .isEqualTo("urgent notice bold"); + .isEqualTo("urgent notice bold"); } } From 5bbf44489b019a9c3b7252108a52539e28e5d757 Mon Sep 17 00:00:00 2001 From: Imran Date: Fri, 27 Jun 2025 12:32:17 +0100 Subject: [PATCH 10/18] updated unit test --- .../admin/AdminCourtFacilityServiceTest.java | 44 +++++++++++++------ 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/src/test/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityServiceTest.java b/src/test/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityServiceTest.java index e419d8e2..ba9f81ac 100644 --- a/src/test/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityServiceTest.java +++ b/src/test/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityServiceTest.java @@ -25,11 +25,13 @@ import java.util.Arrays; import java.util.List; import java.util.Optional; +import java.util.stream.Collectors; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.anyInt; import static org.mockito.Mockito.anyList; import static org.mockito.Mockito.anyString; @@ -56,6 +58,7 @@ class AdminCourtFacilityServiceTest { private static final String BAD_DESCRIPTION_1 = "Description1"; private static final String DESCRIPTION_1 = "Description1"; private static final String DESCRIPTION_CY_1 = "google"; + private static final String SANITIZED_DESCRIPTION_CY_1 = "google"; private static final String DESCRIPTION_2 = "Description2"; private static final String DESCRIPTION_CY_2 = "DescriptionCy2"; private static final String DESCRIPTION_3 = "Description3"; @@ -154,9 +157,20 @@ void shouldReturnNotFoundWhenRetrievingCourtFacilitiesForNonExistentCourt() { @Test void shouldUpdateCourtFacility() { - doAnswer(i -> i.getArguments()[0]) - .when(courtFacilityRepository) - .saveAll(anyList()); + //unsanitizedInput and expectedSanitizedInput needed because they haven't changed by this point by sanitization + //can't use the ones defined at the top even by running INPUT_COURT_FACILITIES through sanitization + List unsanitizedInput = Arrays.asList( + new uk.gov.hmcts.dts.fact.model.admin.Facility(FACILITY_ID_1, BAD_DESCRIPTION_1, DESCRIPTION_CY_1), + new uk.gov.hmcts.dts.fact.model.admin.Facility(FACILITY_ID_2, DESCRIPTION_2, DESCRIPTION_CY_2), + new uk.gov.hmcts.dts.fact.model.admin.Facility(FACILITY_ID_3, DESCRIPTION_3, DESCRIPTION_CY_3) + ); + + List expectedSanitizedInput = Arrays.asList( + new uk.gov.hmcts.dts.fact.model.admin.Facility(FACILITY_ID_1, DESCRIPTION_1, SANITIZED_DESCRIPTION_CY_1), + new uk.gov.hmcts.dts.fact.model.admin.Facility(FACILITY_ID_2, DESCRIPTION_2, DESCRIPTION_CY_2), + new uk.gov.hmcts.dts.fact.model.admin.Facility(FACILITY_ID_3, DESCRIPTION_3, DESCRIPTION_CY_3) + ); + when(courtRepository.findBySlug(COURT_SLUG)).thenReturn(Optional.of(court)); when(courtFacilityRepository.findByCourtId(anyInt())).thenReturn(COURT_FACILITIES); when(courtRepository.save(court)).thenReturn(court); @@ -165,19 +179,23 @@ void shouldUpdateCourtFacility() { .thenReturn(Optional.of(COURT_FACILITIES.get(1).getFacility().getFacilityType())) .thenReturn(Optional.of(COURT_FACILITIES.get(2).getFacility().getFacilityType())); - List results = - adminCourtFacilityService.updateCourtFacility(COURT_SLUG, INPUT_COURT_FACILITIES); + doAnswer(i -> i.getArguments()[0]).when(courtFacilityRepository).saveAll(anyList()); + List results = adminCourtFacilityService.updateCourtFacility(COURT_SLUG, unsanitizedInput); verify(courtFacilityRepository, atLeastOnce()).saveAll(courtFacilityRepositoryArgumentCaptor.capture()); - verify(adminAuditService, atLeastOnce()).saveAudit("Update court facilities", - INPUT_COURT_FACILITIES, - results, - COURT_SLUG); - List> capturedInPerson = courtFacilityRepositoryArgumentCaptor.getAllValues(); - assertEquals("Description1", capturedInPerson.get(0).get(0).getFacility().getDescription()); - assertEquals("google", capturedInPerson.get(0).get(0).getFacility().getDescriptionCy()); + verify(adminAuditService, atLeastOnce()).saveAudit( + eq("Update court facilities"), + eq(COURT_FACILITIES.stream().map(cf -> new uk.gov.hmcts.dts.fact.model.admin.Facility(cf.getFacility())).collect(Collectors.toList())), + eq(expectedSanitizedInput), + eq(COURT_SLUG) + ); + + List> capturedSavedEntities = courtFacilityRepositoryArgumentCaptor.getAllValues(); + assertEquals("Description1", capturedSavedEntities.get(0).get(0).getFacility().getDescription()); + assertEquals("google", capturedSavedEntities.get(0).get(0).getFacility().getDescriptionCy()); + assertThat(results) .hasSize(FACILITY_COUNT) - .containsExactlyElementsOf(EXPECTED_COURT_FACILITIES); + .containsExactlyElementsOf(expectedSanitizedInput); } @Test From 29926081bac578cf8efc22ea94ef80e999c1f58b Mon Sep 17 00:00:00 2001 From: Imran Date: Fri, 27 Jun 2025 12:40:48 +0100 Subject: [PATCH 11/18] checkstyletest --- .../dts/fact/services/admin/AdminCourtFacilityServiceTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityServiceTest.java b/src/test/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityServiceTest.java index ba9f81ac..45e32614 100644 --- a/src/test/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityServiceTest.java +++ b/src/test/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityServiceTest.java @@ -180,7 +180,7 @@ void shouldUpdateCourtFacility() { .thenReturn(Optional.of(COURT_FACILITIES.get(2).getFacility().getFacilityType())); doAnswer(i -> i.getArguments()[0]).when(courtFacilityRepository).saveAll(anyList()); - List results = adminCourtFacilityService.updateCourtFacility(COURT_SLUG, unsanitizedInput); + final List results = adminCourtFacilityService.updateCourtFacility(COURT_SLUG, unsanitizedInput); verify(courtFacilityRepository, atLeastOnce()).saveAll(courtFacilityRepositoryArgumentCaptor.capture()); verify(adminAuditService, atLeastOnce()).saveAudit( eq("Update court facilities"), From 93db92217892585d7aed4b236a3ad2549fb522a6 Mon Sep 17 00:00:00 2001 From: Imran Date: Mon, 7 Jul 2025 12:33:20 +0100 Subject: [PATCH 12/18] fixed over sanitizing --- .../dts/fact/services/admin/AdminCourtFacilityService.java | 4 ++-- .../dts/fact/services/admin/AdminCourtGeneralInfoService.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java index 791df1d4..c20fcece 100644 --- a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java +++ b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java @@ -75,8 +75,8 @@ public List updateCourtFacility(final String slug, final List new NotFoundException(slug)); courtFacilities.forEach(facility -> { - facility.setDescription(OwaspHtmlSanitizer.sanitizeHtml(facility.getDescription())); - facility.setDescriptionCy(OwaspHtmlSanitizer.sanitizeHtml(facility.getDescriptionCy())); + facility.setDescription(facility.getDescription()); + facility.setDescriptionCy(facility.getDescriptionCy()); }); List existingList = getExistingCourtFacilities(courtEntity); diff --git a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java index fbfe295a..14d2a717 100644 --- a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java +++ b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java @@ -63,8 +63,8 @@ public CourtGeneralInfo updateCourtGeneralInfo(final String slug, final CourtGen .orElseThrow(() -> new NotFoundException(slug)); final CourtGeneralInfo originalGeneralInfo = new CourtGeneralInfo(courtEntity); - courtEntity.setAlert(OwaspHtmlSanitizer.sanitizeHtml(generalInfo.getAlert())); - courtEntity.setAlertCy(OwaspHtmlSanitizer.sanitizeHtml(generalInfo.getAlertCy())); + courtEntity.setAlert(generalInfo.getAlert()); + courtEntity.setAlertCy(generalInfo.getAlertCy()); if (rolesProvider.getRoles().contains(FACT_SUPER_ADMIN)) { String newSlug = Utils.convertNameToSlug(generalInfo.getName()); From ef368aaee25a3b84fcfddd87a7d9da8145065d45 Mon Sep 17 00:00:00 2001 From: Imran Date: Mon, 7 Jul 2025 12:40:02 +0100 Subject: [PATCH 13/18] Revert "fixed over sanitizing" This reverts commit 93db92217892585d7aed4b236a3ad2549fb522a6. --- .../dts/fact/services/admin/AdminCourtFacilityService.java | 4 ++-- .../dts/fact/services/admin/AdminCourtGeneralInfoService.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java index c20fcece..791df1d4 100644 --- a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java +++ b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java @@ -75,8 +75,8 @@ public List updateCourtFacility(final String slug, final List new NotFoundException(slug)); courtFacilities.forEach(facility -> { - facility.setDescription(facility.getDescription()); - facility.setDescriptionCy(facility.getDescriptionCy()); + facility.setDescription(OwaspHtmlSanitizer.sanitizeHtml(facility.getDescription())); + facility.setDescriptionCy(OwaspHtmlSanitizer.sanitizeHtml(facility.getDescriptionCy())); }); List existingList = getExistingCourtFacilities(courtEntity); diff --git a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java index 14d2a717..fbfe295a 100644 --- a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java +++ b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java @@ -63,8 +63,8 @@ public CourtGeneralInfo updateCourtGeneralInfo(final String slug, final CourtGen .orElseThrow(() -> new NotFoundException(slug)); final CourtGeneralInfo originalGeneralInfo = new CourtGeneralInfo(courtEntity); - courtEntity.setAlert(generalInfo.getAlert()); - courtEntity.setAlertCy(generalInfo.getAlertCy()); + courtEntity.setAlert(OwaspHtmlSanitizer.sanitizeHtml(generalInfo.getAlert())); + courtEntity.setAlertCy(OwaspHtmlSanitizer.sanitizeHtml(generalInfo.getAlertCy())); if (rolesProvider.getRoles().contains(FACT_SUPER_ADMIN)) { String newSlug = Utils.convertNameToSlug(generalInfo.getName()); From 6e9a490bc970d85620da19708ffb0f4326187f23 Mon Sep 17 00:00:00 2001 From: Imran Date: Mon, 7 Jul 2025 14:18:19 +0100 Subject: [PATCH 14/18] fixed xxs and symbols issues --- .../admin/AdminCourtGeneralInfoService.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java index fbfe295a..aa79800a 100644 --- a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java +++ b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java @@ -1,5 +1,6 @@ package uk.gov.hmcts.dts.fact.services.admin; +import org.apache.commons.text.StringEscapeUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -63,16 +64,27 @@ public CourtGeneralInfo updateCourtGeneralInfo(final String slug, final CourtGen .orElseThrow(() -> new NotFoundException(slug)); final CourtGeneralInfo originalGeneralInfo = new CourtGeneralInfo(courtEntity); - courtEntity.setAlert(OwaspHtmlSanitizer.sanitizeHtml(generalInfo.getAlert())); - courtEntity.setAlertCy(OwaspHtmlSanitizer.sanitizeHtml(generalInfo.getAlertCy())); + + //here we are unescaping anything temporarily so owasp can safely remove them + //after we still have escaped bits (that are safe) so we now need to turn them back into safe html for saving + courtEntity.setAlert(StringEscapeUtils.unescapeHtml4(OwaspHtmlSanitizer.sanitizeHtml( + StringEscapeUtils.unescapeHtml4(generalInfo.getAlert()) + ))); + courtEntity.setAlertCy(StringEscapeUtils.unescapeHtml4(OwaspHtmlSanitizer.sanitizeHtml( + StringEscapeUtils.unescapeHtml4(generalInfo.getAlertCy()) + ))); if (rolesProvider.getRoles().contains(FACT_SUPER_ADMIN)) { String newSlug = Utils.convertNameToSlug(generalInfo.getName()); checkIfUpdatedCourtIsValid(courtEntity.getSlug(), newSlug); courtEntity.setName(generalInfo.getName()); courtEntity.setSlug(newSlug); - courtEntity.setInfo(generalInfo.getInfo()); - courtEntity.setInfoCy(generalInfo.getInfoCy()); + courtEntity.setInfo(StringEscapeUtils.unescapeHtml4(OwaspHtmlSanitizer.sanitizeHtml( + StringEscapeUtils.unescapeHtml4(generalInfo.getInfo()) + ))); + courtEntity.setInfoCy(StringEscapeUtils.unescapeHtml4(OwaspHtmlSanitizer.sanitizeHtml( + StringEscapeUtils.unescapeHtml4(generalInfo.getInfoCy()) + ))); courtEntity.setDisplayed(generalInfo.getOpen()); if (generalInfo.isServiceCentre()) { From 5d895f91ae0d48a92257ef1a3fae24a0c3b34bec Mon Sep 17 00:00:00 2001 From: Imran Date: Mon, 7 Jul 2025 14:22:50 +0100 Subject: [PATCH 15/18] faciltity fix --- .../fact/services/admin/AdminCourtFacilityService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java index 791df1d4..5ad1607b 100644 --- a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java +++ b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtFacilityService.java @@ -1,5 +1,6 @@ package uk.gov.hmcts.dts.fact.services.admin; +import org.apache.commons.text.StringEscapeUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -75,8 +76,12 @@ public List updateCourtFacility(final String slug, final List new NotFoundException(slug)); courtFacilities.forEach(facility -> { - facility.setDescription(OwaspHtmlSanitizer.sanitizeHtml(facility.getDescription())); - facility.setDescriptionCy(OwaspHtmlSanitizer.sanitizeHtml(facility.getDescriptionCy())); + facility.setDescription(StringEscapeUtils.unescapeHtml4(OwaspHtmlSanitizer.sanitizeHtml( + StringEscapeUtils.unescapeHtml4(facility.getDescription()) + ))); + facility.setDescriptionCy(StringEscapeUtils.unescapeHtml4(OwaspHtmlSanitizer.sanitizeHtml( + StringEscapeUtils.unescapeHtml4(facility.getDescriptionCy()) + ))); }); List existingList = getExistingCourtFacilities(courtEntity); From 5495b733b017d0ea71ed1b696c8ea93d8af848d9 Mon Sep 17 00:00:00 2001 From: Imran Date: Mon, 7 Jul 2025 14:46:47 +0100 Subject: [PATCH 16/18] missed sc intro --- .../admin/AdminCourtGeneralInfoService.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java index aa79800a..a5d08799 100644 --- a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java +++ b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java @@ -93,12 +93,22 @@ public CourtGeneralInfo updateCourtGeneralInfo(final String slug, final CourtGen // intro paragraph, or otherwise if one exists, alter the rows instead ServiceCentre serviceCentre = new ServiceCentre(); serviceCentre.setCourtId(courtEntity); - serviceCentre.setIntroParagraph(generalInfo.getScIntroParagraph()); - serviceCentre.setIntroParagraphCy(generalInfo.getScIntroParagraphCy()); + serviceCentre.setIntroParagraph(StringEscapeUtils.unescapeHtml4(OwaspHtmlSanitizer.sanitizeHtml( + StringEscapeUtils.unescapeHtml4(generalInfo.getScIntroParagraph()) + ))); + serviceCentre.setIntroParagraphCy(StringEscapeUtils.unescapeHtml4(OwaspHtmlSanitizer.sanitizeHtml( + StringEscapeUtils.unescapeHtml4(generalInfo.getScIntroParagraphCy()) + ))); courtEntity.setServiceCentre(serviceCentre); } else { - courtEntity.getServiceCentre().setIntroParagraph(generalInfo.getScIntroParagraph()); - courtEntity.getServiceCentre().setIntroParagraphCy(generalInfo.getScIntroParagraphCy()); + courtEntity.getServiceCentre().setIntroParagraph(StringEscapeUtils.unescapeHtml4( + OwaspHtmlSanitizer.sanitizeHtml(StringEscapeUtils.unescapeHtml4( + generalInfo.getScIntroParagraph()) + ))); + courtEntity.getServiceCentre().setIntroParagraphCy(StringEscapeUtils.unescapeHtml4( + OwaspHtmlSanitizer.sanitizeHtml(StringEscapeUtils.unescapeHtml4( + generalInfo.getScIntroParagraph()) + ))); } } } From 003b4b9184dfa2492a7e48cea8af6ca9599ac844 Mon Sep 17 00:00:00 2001 From: Imran Date: Mon, 7 Jul 2025 15:05:49 +0100 Subject: [PATCH 17/18] bugfix --- .../dts/fact/admin/AdminCourtFacilityEndpointTest.java | 9 +++++++-- .../services/admin/AdminCourtGeneralInfoService.java | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/functionalTest/java/uk/gov/hmcts/dts/fact/admin/AdminCourtFacilityEndpointTest.java b/src/functionalTest/java/uk/gov/hmcts/dts/fact/admin/AdminCourtFacilityEndpointTest.java index 140b32ee..064df9bf 100644 --- a/src/functionalTest/java/uk/gov/hmcts/dts/fact/admin/AdminCourtFacilityEndpointTest.java +++ b/src/functionalTest/java/uk/gov/hmcts/dts/fact/admin/AdminCourtFacilityEndpointTest.java @@ -1,6 +1,7 @@ package uk.gov.hmcts.dts.fact.admin; import com.fasterxml.jackson.core.JsonProcessingException; +import org.apache.commons.text.StringEscapeUtils; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -150,8 +151,12 @@ private List getCurrentFacilities() { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") private List updateFacilities(final List facilities) { for (Facility facility: facilities) { - facility.setDescription(OwaspHtmlSanitizer.sanitizeHtml(facility.getDescription())); - facility.setDescriptionCy(OwaspHtmlSanitizer.sanitizeHtml(facility.getDescriptionCy())); + facility.setDescription(StringEscapeUtils.unescapeHtml4(OwaspHtmlSanitizer.sanitizeHtml( + StringEscapeUtils.unescapeHtml4(facility.getDescription()) + ))); + facility.setDescriptionCy(StringEscapeUtils.unescapeHtml4(OwaspHtmlSanitizer.sanitizeHtml( + StringEscapeUtils.unescapeHtml4(facility.getDescriptionCy()) + ))); } final List updatedFacilities = new ArrayList<>(facilities); Facility facility = new Facility(); diff --git a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java index a5d08799..cfe9190b 100644 --- a/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java +++ b/src/main/java/uk/gov/hmcts/dts/fact/services/admin/AdminCourtGeneralInfoService.java @@ -107,7 +107,7 @@ public CourtGeneralInfo updateCourtGeneralInfo(final String slug, final CourtGen ))); courtEntity.getServiceCentre().setIntroParagraphCy(StringEscapeUtils.unescapeHtml4( OwaspHtmlSanitizer.sanitizeHtml(StringEscapeUtils.unescapeHtml4( - generalInfo.getScIntroParagraph()) + generalInfo.getScIntroParagraphCy()) ))); } } From 720407ee61948f1cedf975c26132de93935a5856 Mon Sep 17 00:00:00 2001 From: Imran Date: Fri, 29 Aug 2025 11:29:29 +0100 Subject: [PATCH 18/18] renamed 212 mce datafix to 213. 212 already in master --- .../{V212__mce_datafixes.sql => V213__mce_datafixes.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/db/migration/{V212__mce_datafixes.sql => V213__mce_datafixes.sql} (100%) diff --git a/src/main/resources/db/migration/V212__mce_datafixes.sql b/src/main/resources/db/migration/V213__mce_datafixes.sql similarity index 100% rename from src/main/resources/db/migration/V212__mce_datafixes.sql rename to src/main/resources/db/migration/V213__mce_datafixes.sql