From 825a1134b7fe7e183efa20366edd482543882792 Mon Sep 17 00:00:00 2001
From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com>
Date: Mon, 2 Sep 2024 12:40:26 +0100
Subject: [PATCH 1/4] AP-4216: Update pages to display proceedings as in
designs
---
app/views/providers/has_other_proceedings/show.html.erb | 2 +-
app/views/providers/proceedings_types/index.html.erb | 2 +-
config/initializers/inflections.rb | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/views/providers/has_other_proceedings/show.html.erb b/app/views/providers/has_other_proceedings/show.html.erb
index e3b8940528..fc0eeca7f5 100644
--- a/app/views/providers/has_other_proceedings/show.html.erb
+++ b/app/views/providers/has_other_proceedings/show.html.erb
@@ -10,7 +10,7 @@
<%= summary_list.with_row(html_attributes: { id: "proceeding_type_#{proceeding.ccms_code}" }) do |row| %>
<%= row.with_value do %>
<%= proceeding.meaning %>
- <%= proceeding.category_of_law %> (<%= proceeding.matter_type %>)
+ <%= proceeding.matter_type.humanize %>, <%= proceeding.category_of_law %>
<% end %>
<% if proceeding.sca_type == "core" && @legal_aid_application.related_proceedings.any? %>
<%= row.with_action(
diff --git a/app/views/providers/proceedings_types/index.html.erb b/app/views/providers/proceedings_types/index.html.erb
index 37d7b616c2..7e44ce77d3 100644
--- a/app/views/providers/proceedings_types/index.html.erb
+++ b/app/views/providers/proceedings_types/index.html.erb
@@ -55,7 +55,7 @@
:id,
proceeding_type.ccms_code,
label: { text: proceeding_type.meaning },
- hint: { text: "#{proceeding_type.ccms_category_law} (#{proceeding_type.ccms_matter})" },
+ hint: { text: "#{proceeding_type.ccms_matter.humanize}, #{proceeding_type.ccms_category_law}" },
) %>
<% end %>
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
index 23037648b4..932dd30a04 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/inflections.rb
@@ -23,4 +23,6 @@
inflect.acronym "HMRC"
inflect.acronym "SCA"
inflect.acronym "PDA"
+ inflect.acronym "S8"
+ inflect.acronym "DA"
end
From bed84dffa08e6a5233b47703c700766e83028551 Mon Sep 17 00:00:00 2001
From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com>
Date: Thu, 5 Sep 2024 13:56:46 +0100
Subject: [PATCH 2/4] AP-4216: Update all lfa matter type and category of law
references
---
app/models/cfe/empty/empty_result.rb | 2 +-
.../ccms/attribute_value_generator.rb | 2 +-
features/support/puffing_billy_helper.rb | 32 ++++++++---------
.../cfe_results/empty/mock_results.rb | 2 +-
spec/factories/proceedings.rb | 34 +++++++++----------
.../emergency_defaults_form_spec.rb | 2 +-
.../non_means_tested_attributes_spec.rb | 2 +-
.../passported_attributes_spec.rb | 2 +-
.../proceeding_types/all_spec.rb | 24 ++++++-------
.../proceeding_types/proceeding_spec.rb | 4 +--
10 files changed, 53 insertions(+), 53 deletions(-)
diff --git a/app/models/cfe/empty/empty_result.rb b/app/models/cfe/empty/empty_result.rb
index f83415d765..b24be239ea 100644
--- a/app/models/cfe/empty/empty_result.rb
+++ b/app/models/cfe/empty/empty_result.rb
@@ -13,7 +13,7 @@ def self.blank_cfe_result
income_contribution: 0.0,
matter_types: [
{
- matter_type: "Domestic abuse",
+ matter_type: "domestic abuse (DA)",
result: "no_assessment",
},
],
diff --git a/app/services/ccms/attribute_value_generator.rb b/app/services/ccms/attribute_value_generator.rb
index dffd9019c1..31903de09d 100644
--- a/app/services/ccms/attribute_value_generator.rb
+++ b/app/services/ccms/attribute_value_generator.rb
@@ -209,7 +209,7 @@ def lead_proceeding_category_of_law(_options)
end
def lead_proceeding_category_of_law_is_family?(_options)
- lead_proceeding.category_of_law == "Family"
+ lead_proceeding.category_of_law == "family"
end
def lead_proceeding_meaning(_options)
diff --git a/features/support/puffing_billy_helper.rb b/features/support/puffing_billy_helper.rb
index 41fe312433..694ebf5692 100644
--- a/features/support/puffing_billy_helper.rb
+++ b/features/support/puffing_billy_helper.rb
@@ -166,8 +166,8 @@ def proceeding_search_term_stubs
ccms_code: "DA004",
description: "to be represented on an application for a non-molestation order.",
full_s8_only: false,
- ccms_category_law: "Family",
- ccms_matter: "Domestic abuse",
+ ccms_category_law: "family",
+ ccms_matter: "domestic abuse (DA)",
},
],
},
@@ -180,16 +180,16 @@ def proceeding_search_term_stubs
ccms_code: "DA001",
description: "to be represented on an application for an injunction, order or declaration under the inherent jurisdiction of the court.",
full_s8_only: false,
- ccms_category_law: "Family",
- ccms_matter: "Domestic abuse",
+ ccms_category_law: "family",
+ ccms_matter: "domestic abuse (DA)",
},
{
meaning: "Harassment - injunction",
ccms_code: "DA003",
description: "to be represented in an action for an injunction under section 3 Protection from Harassment Act 1997.",
full_s8_only: false,
- ccms_category_law: "Family",
- ccms_matter: "Domestic abuse",
+ ccms_category_law: "family",
+ ccms_matter: "domestic abuse (DA)",
},
],
},
@@ -202,8 +202,8 @@ def proceeding_search_term_stubs
ccms_code: "DA005",
description: "to be represented on an application for an occupation order.",
full_s8_only: false,
- ccms_category_law: "Family",
- ccms_matter: "Domestic abuse",
+ ccms_category_law: "family",
+ ccms_matter: "domestic abuse (DA)",
},
],
},
@@ -216,8 +216,8 @@ def proceeding_search_term_stubs
ccms_code: "DA020",
description: "To be represented on an application for a Female Genital Mutilation Protection Order under the Female Genital Mutilation Act.",
full_s8_only: false,
- ccms_category_law: "Family",
- ccms_matter: "Domestic abuse",
+ ccms_category_law: "family",
+ ccms_matter: "domestic abuse (DA)",
},
],
},
@@ -230,16 +230,16 @@ def proceeding_search_term_stubs
ccms_code: "DA003",
description: "to be represented in an action for an injunction under section 3 Protection from Harassment Act 1997.",
full_s8_only: false,
- ccms_category_law: "Family",
- ccms_matter: "Domestic abuse",
+ ccms_category_law: "family",
+ ccms_matter: "domestic abuse (DA)",
},
{
meaning: "Non-molestation order",
ccms_code: "DA004",
description: "to be represented on an application for a non-molestation order.",
full_s8_only: false,
- ccms_category_law: "Family",
- ccms_matter: "Domestic abuse",
+ ccms_category_law: "family",
+ ccms_matter: "domestic abuse (DA)",
},
],
},
@@ -252,8 +252,8 @@ def proceeding_search_term_stubs
ccms_code: "SE014",
description: "to be represented on an application for a child arrangements order - where the child(ren) will live",
full_s8_only: false,
- ccms_category_law: "Family",
- ccms_matter: "Children - section 8",
+ ccms_category_law: "family",
+ ccms_matter: "section 8 children (S8)",
},
],
},
diff --git a/spec/factories/cfe_results/empty/mock_results.rb b/spec/factories/cfe_results/empty/mock_results.rb
index 9500d8d889..2aa2cbbe00 100644
--- a/spec/factories/cfe_results/empty/mock_results.rb
+++ b/spec/factories/cfe_results/empty/mock_results.rb
@@ -13,7 +13,7 @@ def self.no_assessment
income_contribution: 0.0,
matter_types: [
{
- matter_type: "Domestic abuse",
+ matter_type: "domestic abuse (DA)",
result: "no_assessment",
},
],
diff --git a/spec/factories/proceedings.rb b/spec/factories/proceedings.rb
index 35da30cab4..6780c3adba 100644
--- a/spec/factories/proceedings.rb
+++ b/spec/factories/proceedings.rb
@@ -63,7 +63,7 @@
used_delegated_functions_reported_on { nil }
name { "inherent_jurisdiction_high_court_injunction" }
matter_type { "Domestic Abuse" }
- category_of_law { "Family" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "MINJN" }
client_involvement_type_ccms_code { "A" }
@@ -90,7 +90,7 @@
used_delegated_functions_reported_on { Time.zone.today }
name { "variation_or_discharge_under_section_protection_from_harassment_act" }
matter_type { "Domestic Abuse" }
- category_of_law { "Family" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "MINJN" }
client_involvement_type_ccms_code { "A" }
@@ -114,7 +114,7 @@
used_delegated_functions_reported_on { Time.zone.today }
name { "occupation_order" }
matter_type { "Domestic Abuse" }
- category_of_law { "Family" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "MINJN" }
client_involvement_type_ccms_code { "A" }
@@ -138,7 +138,7 @@
used_delegated_functions_reported_on { Time.zone.today }
name { "extend_variation_or_discharge_part_iv" }
matter_type { "Domestic Abuse" }
- category_of_law { "Family" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "MINJN" }
client_involvement_type_ccms_code { "A" }
@@ -162,7 +162,7 @@
used_delegated_functions_reported_on { Time.zone.today }
name { "nonmolestation_order" }
matter_type { "Domestic Abuse" }
- category_of_law { "Family" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "MINJN" }
client_involvement_type_ccms_code { "A" }
@@ -185,8 +185,8 @@
used_delegated_functions_on { nil }
used_delegated_functions_reported_on { nil }
name { "prohibited_steps_order_s8" }
- matter_type { "Children - section 8" }
- category_of_law { "Family" }
+ matter_type { "section 8 children (S8)" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
client_involvement_type_ccms_code { "A" }
@@ -210,7 +210,7 @@
used_delegated_functions_reported_on { nil }
name { "specified_issue_order_s8" }
matter_type { "Section 8 orders" }
- category_of_law { "Family" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
client_involvement_type_ccms_code { "A" }
@@ -234,7 +234,7 @@
used_delegated_functions_reported_on { nil }
name { "child_arrangements_order_contact" }
matter_type { "Section 8 orders" }
- category_of_law { "Family" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
client_involvement_type_ccms_code { "A" }
@@ -258,7 +258,7 @@
used_delegated_functions_reported_on { nil }
name { "child_arrangements_order_residence" }
matter_type { "Section 8 orders" }
- category_of_law { "Family" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
client_involvement_type_ccms_code { "A" }
@@ -290,7 +290,7 @@
used_delegated_functions_reported_on { nil }
name { "CAO contact-Appeal" }
matter_type { "Section 8 orders" }
- category_of_law { "Family" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
client_involvement_type_ccms_code { "A" }
@@ -308,8 +308,8 @@
used_delegated_functions_on { nil }
used_delegated_functions_reported_on { nil }
name { "child_assessment_order_sca" }
- matter_type { "Special Children Act" }
- category_of_law { "Family" }
+ matter_type { "special children act (SCA)" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "KPBLW" }
client_involvement_type_ccms_code { "A" }
@@ -331,8 +331,8 @@
used_delegated_functions_on { nil }
used_delegated_functions_reported_on { nil }
name { "app_contact_child_in_care_sca" }
- matter_type { "Special Children Act" }
- category_of_law { "Family" }
+ matter_type { "special children act (SCA)" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "KPBLW" }
client_involvement_type_ccms_code { "A" }
@@ -351,8 +351,8 @@
used_delegated_functions_on { nil }
used_delegated_functions_reported_on { nil }
name { "app_for_supervision_order_sca" }
- matter_type { "Special Children Act" }
- category_of_law { "Family" }
+ matter_type { "special children act (SCA)" }
+ category_of_law { "family" }
category_law_code { "MAT" }
ccms_matter_code { "KPBLW" }
client_involvement_type_ccms_code { "A" }
diff --git a/spec/forms/proceedings/emergency_defaults_form_spec.rb b/spec/forms/proceedings/emergency_defaults_form_spec.rb
index 6fbd192e0e..5f90468840 100644
--- a/spec/forms/proceedings/emergency_defaults_form_spec.rb
+++ b/spec/forms/proceedings/emergency_defaults_form_spec.rb
@@ -16,7 +16,7 @@
used_delegated_functions_reported_on: Time.zone.today,
name: "inherent_jurisdiction_high_court_injunction",
matter_type: "Domestic Abuse",
- category_of_law: "Family",
+ category_of_law: "family",
category_law_code: "MAT",
ccms_matter_code: "MINJN",
client_involvement_type_ccms_code: "A",
diff --git a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb
index d1220fc78a..a29b1b102c 100644
--- a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb
+++ b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb
@@ -967,7 +967,7 @@ module Requestors
it "adds APP_IS_FAMILY attribute with value from application to merits assessment section" do
block = XmlExtractor.call(xml, :global_merits, "APP_IS_FAMILY")
- expect(block).to have_boolean_response(proceeding.category_of_law == "Family")
+ expect(block).to have_boolean_response(proceeding.category_of_law == "family")
end
it "adds CAT_OF_LAW_DESCRIPTION attribute with value from application to merits assessment section" do
diff --git a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb
index c3bba82a68..21f4ada082 100644
--- a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb
+++ b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb
@@ -1359,7 +1359,7 @@ module Requestors
it "populates APP_IS_FAMILY" do
block = XmlExtractor.call(xml, :global_merits, "APP_IS_FAMILY")
- expect(block).to have_boolean_response(proceeding.category_of_law == "Family")
+ expect(block).to have_boolean_response(proceeding.category_of_law == "family")
end
it "populates CAT_OF_LAW_DESCRIPTION" do
diff --git a/spec/services/legal_framework/proceeding_types/all_spec.rb b/spec/services/legal_framework/proceeding_types/all_spec.rb
index f6635b8d76..f808a82d74 100644
--- a/spec/services/legal_framework/proceeding_types/all_spec.rb
+++ b/spec/services/legal_framework/proceeding_types/all_spec.rb
@@ -42,10 +42,10 @@ def all_proceeding_types_payload
full_s8_only: false,
sca_core: false,
sca_related: false,
- ccms_category_law: "Family",
+ ccms_category_law: "family",
ccms_category_law_code: "MAT",
ccms_matter_code: "MINJN",
- ccms_matter: "Domestic abuse",
+ ccms_matter: "domestic abuse (DA)",
},
{
ccms_code: "SE097",
@@ -54,10 +54,10 @@ def all_proceeding_types_payload
full_s8_only: true,
sca_core: false,
sca_related: false,
- ccms_category_law: "Family",
+ ccms_category_law: "family",
ccms_category_law_code: "MAT",
ccms_matter_code: "KSEC8",
- ccms_matter: "Children - section 8",
+ ccms_matter: "section 8 children (S8)",
},
{
ccms_code: "DA003",
@@ -66,10 +66,10 @@ def all_proceeding_types_payload
full_s8_only: false,
sca_core: false,
sca_related: false,
- ccms_category_law: "Family",
+ ccms_category_law: "family",
ccms_category_law_code: "MAT",
ccms_matter_code: "MINJN",
- ccms_matter: "Domestic abuse",
+ ccms_matter: "domestic abuse (DA)",
},
{
ccms_code: "SE016E",
@@ -78,10 +78,10 @@ def all_proceeding_types_payload
full_s8_only: true,
sca_core: false,
sca_related: false,
- ccms_category_law: "Family",
+ ccms_category_law: "family",
ccms_category_law_code: "MAT",
ccms_matter_code: "KSEC8",
- ccms_matter: "Children - section 8",
+ ccms_matter: "section 8 children (S8)",
},
{
ccms_code: "DA006",
@@ -90,10 +90,10 @@ def all_proceeding_types_payload
full_s8_only: false,
sca_core: false,
sca_related: false,
- ccms_category_law: "Family",
+ ccms_category_law: "family",
ccms_category_law_code: "MAT",
ccms_matter_code: "MINJN",
- ccms_matter: "Domestic abuse",
+ ccms_matter: "domestic abuse (DA)",
},
{
ccms_code: "PB003",
@@ -102,10 +102,10 @@ def all_proceeding_types_payload
full_s8_only: false,
sca_core: true,
sca_related: false,
- ccms_category_law: "Family",
+ ccms_category_law: "family",
ccms_category_law_code: "MAT",
ccms_matter_code: "KPBLW",
- ccms_matter: "Special Children Act",
+ ccms_matter: "special children act (SCA)",
},
].to_json
end
diff --git a/spec/services/legal_framework/proceeding_types/proceeding_spec.rb b/spec/services/legal_framework/proceeding_types/proceeding_spec.rb
index 1108bb1262..4007f68305 100644
--- a/spec/services/legal_framework/proceeding_types/proceeding_spec.rb
+++ b/spec/services/legal_framework/proceeding_types/proceeding_spec.rb
@@ -29,9 +29,9 @@
it "has the expected values in all attributes" do
response = call
- expect(response.ccms_category_law).to eq "Family"
+ expect(response.ccms_category_law).to eq "family"
expect(response.ccms_category_law_code).to eq "MAT"
- expect(response.ccms_matter).to eq "Domestic abuse"
+ expect(response.ccms_matter).to eq "domestic abuse (DA)"
expect(response.ccms_matter_code).to eq "MINJN"
expect(response.cost_limitations).to eq expected_cost_limitations
expect(response.default_scope_limitations).to eq expected_default_scope_limitations
From 20fbaf74aa02cd4caa0297f6944454b6101648fd Mon Sep 17 00:00:00 2001
From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com>
Date: Thu, 5 Sep 2024 14:47:08 +0100
Subject: [PATCH 3/4] AP-2416: Revert 'family' to 'Family'
Reverting as CategoryOfLawDescription is sent in the CCMS payload from Apply
---
.../ccms/attribute_value_generator.rb | 2 +-
.../has_other_proceedings/show.html.erb | 2 +-
.../proceedings_types/index.html.erb | 2 +-
features/support/puffing_billy_helper.rb | 16 ++++++------
spec/factories/proceedings.rb | 26 +++++++++----------
.../emergency_defaults_form_spec.rb | 2 +-
.../non_means_tested_attributes_spec.rb | 2 +-
.../passported_attributes_spec.rb | 2 +-
.../proceeding_types/all_spec.rb | 12 ++++-----
.../proceeding_types/proceeding_spec.rb | 4 +--
10 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/app/services/ccms/attribute_value_generator.rb b/app/services/ccms/attribute_value_generator.rb
index 31903de09d..dffd9019c1 100644
--- a/app/services/ccms/attribute_value_generator.rb
+++ b/app/services/ccms/attribute_value_generator.rb
@@ -209,7 +209,7 @@ def lead_proceeding_category_of_law(_options)
end
def lead_proceeding_category_of_law_is_family?(_options)
- lead_proceeding.category_of_law == "family"
+ lead_proceeding.category_of_law == "Family"
end
def lead_proceeding_meaning(_options)
diff --git a/app/views/providers/has_other_proceedings/show.html.erb b/app/views/providers/has_other_proceedings/show.html.erb
index fc0eeca7f5..d6fa1b5bcb 100644
--- a/app/views/providers/has_other_proceedings/show.html.erb
+++ b/app/views/providers/has_other_proceedings/show.html.erb
@@ -10,7 +10,7 @@
<%= summary_list.with_row(html_attributes: { id: "proceeding_type_#{proceeding.ccms_code}" }) do |row| %>
<%= row.with_value do %>
<%= proceeding.meaning %>
- <%= proceeding.matter_type.humanize %>, <%= proceeding.category_of_law %>
+ <%= proceeding.matter_type.humanize %>, <%= proceeding.category_of_law.downcase %>
<% end %>
<% if proceeding.sca_type == "core" && @legal_aid_application.related_proceedings.any? %>
<%= row.with_action(
diff --git a/app/views/providers/proceedings_types/index.html.erb b/app/views/providers/proceedings_types/index.html.erb
index 7e44ce77d3..ca9ac47ebd 100644
--- a/app/views/providers/proceedings_types/index.html.erb
+++ b/app/views/providers/proceedings_types/index.html.erb
@@ -55,7 +55,7 @@
:id,
proceeding_type.ccms_code,
label: { text: proceeding_type.meaning },
- hint: { text: "#{proceeding_type.ccms_matter.humanize}, #{proceeding_type.ccms_category_law}" },
+ hint: { text: "#{proceeding_type.ccms_matter.humanize}, #{proceeding_type.ccms_category_law.downcase}" },
) %>
<% end %>
diff --git a/features/support/puffing_billy_helper.rb b/features/support/puffing_billy_helper.rb
index 694ebf5692..b9d6da3570 100644
--- a/features/support/puffing_billy_helper.rb
+++ b/features/support/puffing_billy_helper.rb
@@ -166,7 +166,7 @@ def proceeding_search_term_stubs
ccms_code: "DA004",
description: "to be represented on an application for a non-molestation order.",
full_s8_only: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_matter: "domestic abuse (DA)",
},
],
@@ -180,7 +180,7 @@ def proceeding_search_term_stubs
ccms_code: "DA001",
description: "to be represented on an application for an injunction, order or declaration under the inherent jurisdiction of the court.",
full_s8_only: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_matter: "domestic abuse (DA)",
},
{
@@ -188,7 +188,7 @@ def proceeding_search_term_stubs
ccms_code: "DA003",
description: "to be represented in an action for an injunction under section 3 Protection from Harassment Act 1997.",
full_s8_only: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_matter: "domestic abuse (DA)",
},
],
@@ -202,7 +202,7 @@ def proceeding_search_term_stubs
ccms_code: "DA005",
description: "to be represented on an application for an occupation order.",
full_s8_only: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_matter: "domestic abuse (DA)",
},
],
@@ -216,7 +216,7 @@ def proceeding_search_term_stubs
ccms_code: "DA020",
description: "To be represented on an application for a Female Genital Mutilation Protection Order under the Female Genital Mutilation Act.",
full_s8_only: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_matter: "domestic abuse (DA)",
},
],
@@ -230,7 +230,7 @@ def proceeding_search_term_stubs
ccms_code: "DA003",
description: "to be represented in an action for an injunction under section 3 Protection from Harassment Act 1997.",
full_s8_only: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_matter: "domestic abuse (DA)",
},
{
@@ -238,7 +238,7 @@ def proceeding_search_term_stubs
ccms_code: "DA004",
description: "to be represented on an application for a non-molestation order.",
full_s8_only: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_matter: "domestic abuse (DA)",
},
],
@@ -252,7 +252,7 @@ def proceeding_search_term_stubs
ccms_code: "SE014",
description: "to be represented on an application for a child arrangements order - where the child(ren) will live",
full_s8_only: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_matter: "section 8 children (S8)",
},
],
diff --git a/spec/factories/proceedings.rb b/spec/factories/proceedings.rb
index 6780c3adba..b10a2b76d9 100644
--- a/spec/factories/proceedings.rb
+++ b/spec/factories/proceedings.rb
@@ -63,7 +63,7 @@
used_delegated_functions_reported_on { nil }
name { "inherent_jurisdiction_high_court_injunction" }
matter_type { "Domestic Abuse" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "MINJN" }
client_involvement_type_ccms_code { "A" }
@@ -90,7 +90,7 @@
used_delegated_functions_reported_on { Time.zone.today }
name { "variation_or_discharge_under_section_protection_from_harassment_act" }
matter_type { "Domestic Abuse" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "MINJN" }
client_involvement_type_ccms_code { "A" }
@@ -114,7 +114,7 @@
used_delegated_functions_reported_on { Time.zone.today }
name { "occupation_order" }
matter_type { "Domestic Abuse" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "MINJN" }
client_involvement_type_ccms_code { "A" }
@@ -138,7 +138,7 @@
used_delegated_functions_reported_on { Time.zone.today }
name { "extend_variation_or_discharge_part_iv" }
matter_type { "Domestic Abuse" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "MINJN" }
client_involvement_type_ccms_code { "A" }
@@ -162,7 +162,7 @@
used_delegated_functions_reported_on { Time.zone.today }
name { "nonmolestation_order" }
matter_type { "Domestic Abuse" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "MINJN" }
client_involvement_type_ccms_code { "A" }
@@ -186,7 +186,7 @@
used_delegated_functions_reported_on { nil }
name { "prohibited_steps_order_s8" }
matter_type { "section 8 children (S8)" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
client_involvement_type_ccms_code { "A" }
@@ -210,7 +210,7 @@
used_delegated_functions_reported_on { nil }
name { "specified_issue_order_s8" }
matter_type { "Section 8 orders" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
client_involvement_type_ccms_code { "A" }
@@ -234,7 +234,7 @@
used_delegated_functions_reported_on { nil }
name { "child_arrangements_order_contact" }
matter_type { "Section 8 orders" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
client_involvement_type_ccms_code { "A" }
@@ -258,7 +258,7 @@
used_delegated_functions_reported_on { nil }
name { "child_arrangements_order_residence" }
matter_type { "Section 8 orders" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
client_involvement_type_ccms_code { "A" }
@@ -290,7 +290,7 @@
used_delegated_functions_reported_on { nil }
name { "CAO contact-Appeal" }
matter_type { "Section 8 orders" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
client_involvement_type_ccms_code { "A" }
@@ -309,7 +309,7 @@
used_delegated_functions_reported_on { nil }
name { "child_assessment_order_sca" }
matter_type { "special children act (SCA)" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KPBLW" }
client_involvement_type_ccms_code { "A" }
@@ -332,7 +332,7 @@
used_delegated_functions_reported_on { nil }
name { "app_contact_child_in_care_sca" }
matter_type { "special children act (SCA)" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KPBLW" }
client_involvement_type_ccms_code { "A" }
@@ -352,7 +352,7 @@
used_delegated_functions_reported_on { nil }
name { "app_for_supervision_order_sca" }
matter_type { "special children act (SCA)" }
- category_of_law { "family" }
+ category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KPBLW" }
client_involvement_type_ccms_code { "A" }
diff --git a/spec/forms/proceedings/emergency_defaults_form_spec.rb b/spec/forms/proceedings/emergency_defaults_form_spec.rb
index 5f90468840..6fbd192e0e 100644
--- a/spec/forms/proceedings/emergency_defaults_form_spec.rb
+++ b/spec/forms/proceedings/emergency_defaults_form_spec.rb
@@ -16,7 +16,7 @@
used_delegated_functions_reported_on: Time.zone.today,
name: "inherent_jurisdiction_high_court_injunction",
matter_type: "Domestic Abuse",
- category_of_law: "family",
+ category_of_law: "Family",
category_law_code: "MAT",
ccms_matter_code: "MINJN",
client_involvement_type_ccms_code: "A",
diff --git a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb
index a29b1b102c..d1220fc78a 100644
--- a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb
+++ b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb
@@ -967,7 +967,7 @@ module Requestors
it "adds APP_IS_FAMILY attribute with value from application to merits assessment section" do
block = XmlExtractor.call(xml, :global_merits, "APP_IS_FAMILY")
- expect(block).to have_boolean_response(proceeding.category_of_law == "family")
+ expect(block).to have_boolean_response(proceeding.category_of_law == "Family")
end
it "adds CAT_OF_LAW_DESCRIPTION attribute with value from application to merits assessment section" do
diff --git a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb
index 21f4ada082..c3bba82a68 100644
--- a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb
+++ b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb
@@ -1359,7 +1359,7 @@ module Requestors
it "populates APP_IS_FAMILY" do
block = XmlExtractor.call(xml, :global_merits, "APP_IS_FAMILY")
- expect(block).to have_boolean_response(proceeding.category_of_law == "family")
+ expect(block).to have_boolean_response(proceeding.category_of_law == "Family")
end
it "populates CAT_OF_LAW_DESCRIPTION" do
diff --git a/spec/services/legal_framework/proceeding_types/all_spec.rb b/spec/services/legal_framework/proceeding_types/all_spec.rb
index f808a82d74..b9bf0ff01a 100644
--- a/spec/services/legal_framework/proceeding_types/all_spec.rb
+++ b/spec/services/legal_framework/proceeding_types/all_spec.rb
@@ -42,7 +42,7 @@ def all_proceeding_types_payload
full_s8_only: false,
sca_core: false,
sca_related: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "MINJN",
ccms_matter: "domestic abuse (DA)",
@@ -54,7 +54,7 @@ def all_proceeding_types_payload
full_s8_only: true,
sca_core: false,
sca_related: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "KSEC8",
ccms_matter: "section 8 children (S8)",
@@ -66,7 +66,7 @@ def all_proceeding_types_payload
full_s8_only: false,
sca_core: false,
sca_related: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "MINJN",
ccms_matter: "domestic abuse (DA)",
@@ -78,7 +78,7 @@ def all_proceeding_types_payload
full_s8_only: true,
sca_core: false,
sca_related: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "KSEC8",
ccms_matter: "section 8 children (S8)",
@@ -90,7 +90,7 @@ def all_proceeding_types_payload
full_s8_only: false,
sca_core: false,
sca_related: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "MINJN",
ccms_matter: "domestic abuse (DA)",
@@ -102,7 +102,7 @@ def all_proceeding_types_payload
full_s8_only: false,
sca_core: true,
sca_related: false,
- ccms_category_law: "family",
+ ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "KPBLW",
ccms_matter: "special children act (SCA)",
diff --git a/spec/services/legal_framework/proceeding_types/proceeding_spec.rb b/spec/services/legal_framework/proceeding_types/proceeding_spec.rb
index 4007f68305..1108bb1262 100644
--- a/spec/services/legal_framework/proceeding_types/proceeding_spec.rb
+++ b/spec/services/legal_framework/proceeding_types/proceeding_spec.rb
@@ -29,9 +29,9 @@
it "has the expected values in all attributes" do
response = call
- expect(response.ccms_category_law).to eq "family"
+ expect(response.ccms_category_law).to eq "Family"
expect(response.ccms_category_law_code).to eq "MAT"
- expect(response.ccms_matter).to eq "domestic abuse (DA)"
+ expect(response.ccms_matter).to eq "Domestic abuse"
expect(response.ccms_matter_code).to eq "MINJN"
expect(response.cost_limitations).to eq expected_cost_limitations
expect(response.default_scope_limitations).to eq expected_default_scope_limitations
From af7201e1a78eb412c6595352454e39041ab855cb Mon Sep 17 00:00:00 2001
From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com>
Date: Thu, 5 Sep 2024 15:39:26 +0100
Subject: [PATCH 4/4] AP-4216: update query to use matter code rather than name
---
app/services/query/incomplete_proceedings.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/services/query/incomplete_proceedings.rb b/app/services/query/incomplete_proceedings.rb
index f1f6d76dcc..a1b5c0314c 100644
--- a/app/services/query/incomplete_proceedings.rb
+++ b/app/services/query/incomplete_proceedings.rb
@@ -25,7 +25,7 @@ def query
(
NOT EXISTS (select 'has_scope_limitations' FROM scope_limitations where (proceeding_id = proceedings.id))
OR (used_delegated_functions IS NULL)
- OR (accepted_substantive_defaults IS NULL AND matter_type != 'Special Children Act')
+ OR (accepted_substantive_defaults IS NULL AND ccms_matter_code != 'KPBLW')
OR (client_involvement_type_ccms_code IS NULL)
OR (used_delegated_functions = true AND accepted_emergency_defaults IS NULL)
OR (accepted_substantive_defaults = false