Skip to content

Commit

Permalink
Merge pull request #3038 from alphagov/SFO-finder
Browse files Browse the repository at this point in the history
Add SFO finder to Search API
  • Loading branch information
GDSNewt authored Nov 5, 2024
2 parents f0c9961 + fa1b96b commit 706d030
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/govuk_index/mapped_document_types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ service_manual_service_standard: service_manual_guide
service_manual_service_toolkit: edition
service_manual_topic: service_manual_topic
service_standard_report: service_standard_report # Specialist Publisher
sfo_case: sfo_case # Specialist Publisher
simple_smart_answer: edition
smart_answer: edition
statutory_instrument: statutory_instrument # Specialist Publisher
Expand Down
1 change: 1 addition & 0 deletions config/govuk_index/migrated_formats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ migrated:
- research_for_development_output
- residential_property_tribunal_decision
- service_standard_report
- sfo_case
- statutory_instrument
- tax_tribunal_decision
- traffic_commissioner_regulatory_decision
Expand Down
17 changes: 17 additions & 0 deletions config/schema/elasticsearch_types/sfo_case.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"fields": [
"sfo_case_state"
],
"expanded_search_result_fields": {
"sfo_case_state": [
{
"label": "Open",
"value": "open"
},
{
"label": "Closed",
"value": "closed"
}
]
}
}
4 changes: 4 additions & 0 deletions config/schema/field_definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1100,5 +1100,9 @@
},
"veterans_support_organisation_region_wales": {
"type": "identifiers"
},
"sfo_case_state": {
"description": "Whether a case is open or closed. Applies to SFO cases.",
"type": "identifiers"
}
}
3 changes: 2 additions & 1 deletion config/schema/indexes/govuk.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@
"raib_report",
"research_for_development_output",
"residential_property_tribunal_decision",
"traffic_commissioner_regulatory_decision",
"service_manual_guide",
"service_manual_topic",
"service_standard_report",
"sfo_case",
"statutory_instrument",
"tax_tribunal_decision",
"traffic_commissioner_regulatory_decision",
"utaac_decision",
"veterans_support_organisation"
]
Expand Down
1 change: 1 addition & 0 deletions lib/govuk_index/presenters/elasticsearch_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def document
roles: expanded_links.roles,
sector: specialist.sector,
service_provider: specialist.service_provider,
sfo_case_state: specialist.sfo_case_state,
sift_end_date: specialist.sift_end_date,
sifting_status: specialist.sifting_status,
slug:,
Expand Down
1 change: 1 addition & 0 deletions lib/govuk_index/presenters/specialist_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class SpecialistPresenter
delegate_to_payload :review_status
delegate_to_payload :sector, convert_to_array: true
delegate_to_payload :service_provider
delegate_to_payload :sfo_case_state
delegate_to_payload :sift_end_date
delegate_to_payload :sifting_status
delegate_to_payload :stage
Expand Down

0 comments on commit 706d030

Please sign in to comment.