diff --git a/README.md b/README.md index 54ea7a0844..a69580e715 100644 --- a/README.md +++ b/README.md @@ -32,17 +32,17 @@ simply ignored The following environment variables are required: -| Name | Default | Description | -|------|---------|-------------| -| DEFINITION_STORE_DB_USERNAME | - | Username for database | -| DEFINITION_STORE_DB_PASSWORD | - | Password for database | -| DEFINITION_STORE_DB_USE_SSL | - | set to `true` if SSL is to be enabled. `false` recommended for local environments. | -| DEFINITION_STORE_IDAM_KEY | - | Definition store's IDAM S2S micro-service secret key. This must match the IDAM instance it's being run against. | -| DEFINITION_STORE_S2S_AUTHORISED_SERVICES | ccd_data,ccd_gw,ccd_admin,jui_webapp,pui_webapp,aac_manage_case_assignment | Authorised micro-service names for S2S calls | -| IDAM_USER_URL | - | Base URL for IdAM's User API service (idam-app). `http://localhost:4501` for the dockerised local instance or tunneled `dev` instance. | -| IDAM_S2S_URL | - | Base URL for IdAM's S2S API service (service-auth-provider). `http://localhost:4502` for the dockerised local instance or tunneled `dev` instance. | -| USER_PROFILE_HOST | - | Base URL for the User Profile service. `http://localhost:4453` for the dockerised local instance. | -| AZURE_APPLICATIONINSIGHTS_INSTRUMENTATIONKEY | - | secrets for Microsoft Insights logging, can be a dummy string in local | +| Name | Default | Description | +|------|-----------------------------------------------------------------------------|-------------| +| DEFINITION_STORE_DB_USERNAME | - | Username for database | +| DEFINITION_STORE_DB_PASSWORD | - | Password for database | +| DEFINITION_STORE_DB_USE_SSL | - | set to `true` if SSL is to be enabled. `false` recommended for local environments. | +| DEFINITION_STORE_IDAM_KEY | - | Definition store's IDAM S2S micro-service secret key. This must match the IDAM instance it's being run against. | +| DEFINITION_STORE_S2S_AUTHORISED_SERVICES | ccd_data,ccd_gw,ccd_admin,jui_webapp,pui_webapp,aac_manage_case_assignment,xui_webapp | Authorised micro-service names for S2S calls | +| IDAM_USER_URL | - | Base URL for IdAM's User API service (idam-app). `http://localhost:4501` for the dockerised local instance or tunneled `dev` instance. | +| IDAM_S2S_URL | - | Base URL for IdAM's S2S API service (service-auth-provider). `http://localhost:4502` for the dockerised local instance or tunneled `dev` instance. | +| USER_PROFILE_HOST | - | Base URL for the User Profile service. `http://localhost:4453` for the dockerised local instance. | +| AZURE_APPLICATIONINSIGHTS_INSTRUMENTATIONKEY | - | secrets for Microsoft Insights logging, can be a dummy string in local | ### Building diff --git a/application/src/main/resources/application.properties b/application/src/main/resources/application.properties index b34ed2ea0c..57e4201492 100644 --- a/application/src/main/resources/application.properties +++ b/application/src/main/resources/application.properties @@ -47,7 +47,7 @@ oidc.issuer = ${OIDC_ISSUER:http://fr-am:8080/openam/oauth2/hmcts} idam.s2s-auth.url=${IDAM_S2S_URL:http://localhost:4502} idam.s2s-auth.microservice=ccd_definition idam.s2s-auth.totp_secret=${DEFINITION_STORE_IDAM_KEY:AAAAAAAAAAAAAAAA} -idam.s2s-authorised.services=${DEFINITION_STORE_S2S_AUTHORISED_SERVICES:ccd_data,ccd_gw,ccd_admin,jui_webapp,pui_webapp,aac_manage_case_assignment} +idam.s2s-authorised.services=${DEFINITION_STORE_S2S_AUTHORISED_SERVICES:ccd_data,ccd_gw,ccd_admin,jui_webapp,pui_webapp,aac_manage_case_assignment,xui_webapp} ccd.user-profile.host=${USER_PROFILE_HOST:http://localhost:4453} diff --git a/charts/ccd-definition-store-api/Chart.yaml b/charts/ccd-definition-store-api/Chart.yaml index d2e088476b..1c70dccef6 100644 --- a/charts/ccd-definition-store-api/Chart.yaml +++ b/charts/ccd-definition-store-api/Chart.yaml @@ -2,7 +2,7 @@ description: Helm chart for the HMCTS CCD Definition Store name: ccd-definition-store-api apiVersion: v2 home: https://github.com/hmcts/ccd-definition-store-api -version: 1.6.18 +version: 1.6.19 maintainers: - name: HMCTS CCD Dev Team email: ccd-devops@HMCTS.NET diff --git a/charts/ccd-definition-store-api/values.yaml b/charts/ccd-definition-store-api/values.yaml index bc7454d602..da27f037e0 100644 --- a/charts/ccd-definition-store-api/values.yaml +++ b/charts/ccd-definition-store-api/values.yaml @@ -31,7 +31,7 @@ java: DEFINITION_STORE_DB_MAX_POOL_SIZE: 25 - DEFINITION_STORE_S2S_AUTHORISED_SERVICES: ccd_data,ccd_gw,ccd_admin,jui_webapp,pui_webapp,aac_manage_case_assignment + DEFINITION_STORE_S2S_AUTHORISED_SERVICES: ccd_data,ccd_gw,ccd_admin,jui_webapp,pui_webapp,aac_manage_case_assignment,xui_webapp # Storage Account AZURE_STORAGE_BLOB_CONTAINER_REFERENCE: ccd-definition-store-api-imports-{{ .Values.global.environment }} diff --git a/docker-compose.yml b/docker-compose.yml index 914dd8743c..c410601408 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: - DEFINITION_STORE_DB_USERNAME=definition_store - DEFINITION_STORE_DB_PASSWORD=definition_store - DEFINITION_STORE_IDAM_KEY - - DEFINITION_STORE_S2S_AUTHORISED_SERVICES=ccd_data,ccd_gw,ccd_admin,jui_webapp,pui_webapp,aac_manage_case_assignment + - DEFINITION_STORE_S2S_AUTHORISED_SERVICES=ccd_data,ccd_gw,ccd_admin,jui_webapp,pui_webapp,aac_manage_case_assignment,xui_webapp - USER_PROFILE_HOST - IDAM_USER_URL - IDAM_S2S_URL diff --git a/excel-importer/src/test/java/uk/gov/hmcts/ccd/definition/store/excel/parser/EventParserTest.java b/excel-importer/src/test/java/uk/gov/hmcts/ccd/definition/store/excel/parser/EventParserTest.java index b3c53d5c9e..f9f243f299 100644 --- a/excel-importer/src/test/java/uk/gov/hmcts/ccd/definition/store/excel/parser/EventParserTest.java +++ b/excel-importer/src/test/java/uk/gov/hmcts/ccd/definition/store/excel/parser/EventParserTest.java @@ -223,7 +223,8 @@ public void shouldParseEventWithoutRestrictionDataItem() { assertThat(entity.getPreStates(), empty()); assertLogged(listAppender, - "Parsing event case fields for case type Some Case Type and event event id: No event case fields found"); + "Parsing event case fields for case type Some Case Type and event event id: No event case fields" + + " found"); } @Test @@ -262,6 +263,18 @@ public void shouldParseEventWithEventEnablingCondition() { assertEvent(entity); } + @Test + public void shouldParseEventWithChainedEventEnablingCondition() { + final String validEventEnablingCondition = "(FieldA!=\"\" AND FieldB=\"I'm innocent\") " + + "OR (FieldC=\"I'm guilty\")"; + item.addAttribute(ColumnName.EVENT_ENABLING_CONDITION.toString(), validEventEnablingCondition); + definitionSheet.addDataItem(item); + final Collection eventEntities = eventParser.parseAll(definitionSheets, caseType); + assertThat(eventEntities.size(), is(1)); + entity = new ArrayList<>(eventEntities).get(0); + assertEvent(entity); + } + @Test public void shouldFailParseEventWithEmptyEventEnablingCondition() { final String validEventEnablingCondition = " ";