-
Notifications
You must be signed in to change notification settings - Fork 30
Ccd 5330 update elastic search query populate new case data #2543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
patelila
wants to merge
57
commits into
CCD-5332_update_supplementary_data_new_case
Choose a base branch
from
CCD-5330_Update_elastic_search_query_populate_new_case_data
base: CCD-5332_update_supplementary_data_new_case
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
da5643d
CCD-5333 UC : Clear the new cases supplementary data for an organisat…
patelila 976e6e7
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila a467cd2
Test data and changes for unit tests
patelila c3523e0
Merge remote-tracking branch 'origin/CCD-5329_CCD-5333_Clear_new_case…
patelila c3f22fa
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila eb2cea3
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila c1ca993
unit test
patelila f86a6b7
added unit test
patelila c5bdffe
empty commit to trigger build
patelila 8949b0d
empty commit to trigger build
patelila 1ebcc6a
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila 00fa80a
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila a33602c
AC 1
patelila 2530d03
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila c677149
Version of java helm chart below 5.3.0 is deprecated
patelila c23dd9c
Merge remote-tracking branch 'origin/CCD-5329_CCD-5333_Clear_new_case…
patelila 08ec16b
feature changes
patelila 13231e0
Bumping chart version/ fixing aliases
hmcts-jenkins-a-to-c[bot] bc95acb
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila 7b20ba6
Modified to comment out the call to clearUserAssignedNewCase as not s…
patelila 39856f7
revert
patelila e497a4d
changes for new_case
patelila de290c3
code tidy
patelila 836a11f
checkstyle error
patelila 956cffa
add missing files
patelila 76a0643
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila b801e6b
Funtional test for CCD-5330
patelila f588bac
Functional test for CCD-5330
patelila 5fa1b55
Merge branch 'CCD-5329_CCD-5333_Clear_new_cases_supplementary_data-or…
patelila 6fe2747
fix failure in Functional test .3/4 for CCD-5330
patelila 80fc4d9
ccd-test-def version change
patelila 472ff3c
jenkins change
patelila 20dc7ac
use pr-1534
patelila 166ae38
empty commit to trigger build
patelila c38ff89
use pr-1534
patelila 4735e36
empty commit to trigger build
patelila 038b78e
added FT for multiple organisations
patelila ec996a1
fix new_case Org value currrently set to be a string instead of boole…
patelila b35bddc
Checkstyle error fix
patelila 37efea5
extra FT to search New cases from supplementary data where new case v…
patelila 8ac15a7
fix error: actualResponse.body.supplementary_data.new_case contains a…
patelila 336e092
fix errors like : actualResponse.body contains a bad value: arrayInM…
patelila 08fbb4c
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila 51a22cd
empty commit to trigger build
patelila cd38a30
empty commit to trigger build
patelila d0abb54
FT-105: S-109/S-105 -failing on State being populated for case of ty…
patelila b7c6515
empty commit to trigger build
patelila 99feae3
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila adc6791
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila ab7553d
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila e6f9eb8
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila d9204ec
fix for merge build errors
patelila 953769e
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila 6fcfedf
resolving conflicts
patelila ed4aa27
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila fec4837
resolving conflicts
patelila 9c20a4d
Merge branch 'CCD-5332_update_supplementary_data_new_case' into CCD-5…
patelila File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ | |
}, | ||
"supplementary_data" : { | ||
"new_case" : { | ||
"orgID1" : "true" | ||
"orgID1" : true | ||
} | ||
} | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ | |
"supplementary_data": { | ||
"new_case": [ | ||
{ | ||
"orgID1" : "true" | ||
"orgID1" : true | ||
} | ||
] | ||
}, | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ | |
}, | ||
"supplementary_data" : { | ||
"new_case" : { | ||
"orgID1" : "true" | ||
"orgID1" : true | ||
} | ||
} | ||
} | ||
|
53 changes: 53 additions & 0 deletions
53
...aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
@F-143 @elasticsearch | ||
Feature: F-143 Additional new cases supplementary data property returned by ES Search APIs | ||
|
||
Background: Load test data for the scenario | ||
Given an appropriate test context as detailed in the test data source | ||
And a case that has just been created as in [F-143_CreateCasePreRequisiteCaseworker] | ||
And a successful call [to add supplementary data for the case] as in [F-143_Add_Supplementary_Data] | ||
And a wait time of [5] seconds [to allow for Logstash to index the case just created], | ||
And a user with [a valid profile] | ||
|
||
@S-143.1 #AC03 | ||
Scenario: internal search api usecase request does not return supplementary data by default | ||
Given the request [is configured to search for the previously created case], | ||
And the request [does not explicitly request supplementary_data] | ||
And the request [is using the query parameter use_case=orgcases], | ||
And a request is prepared with appropriate values, | ||
When it is submitted to call the [Internal Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], | ||
Then the response [contains the previously created case], | ||
Then the response [contains supplementary data], | ||
And the response has all other details as expected. | ||
|
||
@S-143.2 #AC01 | ||
Scenario: internal search api usecase request does return supplementary data when requested in the request | ||
Given the request [is configured to search for the previously created case], | ||
And the request [is configured to request supplementary_data] | ||
And the request [is using the query parameter use_case=orgcases], | ||
And a request is prepared with appropriate values, | ||
When it is submitted to call the [Internal Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], | ||
Then the response [contains the previously created case], | ||
Then the response [contains supplementary data], | ||
And the response has all other details as expected. | ||
|
||
@S-143.3 #AC04 | ||
Scenario: external search api can request sub selection of supplementary data | ||
Given a user with [a valid profile] | ||
When the request [is configured to search for the previously created case], | ||
And the request [requests a subsection of the supplementary data] | ||
And a request is prepared with appropriate values, | ||
And it is submitted to call the [External Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], | ||
Then the response [contains the previously created case], | ||
Then the response [contains the specified sub section of supplementary data], | ||
And the response has all other details as expected. | ||
|
||
@S-143.4 #AC01 | ||
Scenario: external search api can request New cases from supplementary data where new case value is true | ||
Given a user with [a valid profile] | ||
When the request [is configured to search for the previously created case], | ||
And the request [requests a subsection of the supplementary data] | ||
And a request is prepared with appropriate values, | ||
And it is submitted to call the [External Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], | ||
Then the response [contains the previously created case], | ||
Then the response [contains the specified sub section of supplementary data], | ||
And the response has all other details as expected. |
35 changes: 35 additions & 0 deletions
35
...F-143 - supplementary_data new case in ES Search API/F-143_Add_Supplementary_Data.td.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"_guid_": "F-143_Add_Supplementary_Data", | ||
"title": "Update Supplementary Data Base", | ||
"productName": "CCD Data Store", | ||
"operationName": "Update Supplementary Data", | ||
"method": "POST", | ||
"uri": "/cases/{caseId}/supplementary-data", | ||
"specs": ["to add supplementary data for the case"], | ||
"users": { | ||
"invokingUser": { | ||
"_extends_": "BeftaCaseworkerCaa" | ||
} | ||
}, | ||
"request": { | ||
"_extends_": "Common_Request", | ||
"pathVariables": { | ||
"caseId": "${[scenarioContext][parentContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" | ||
}, | ||
"body": { | ||
"supplementary_data_updates": { | ||
"$set": { | ||
"new_case.orgID1": true | ||
} | ||
} | ||
} | ||
}, | ||
"expectedResponse": { | ||
"_extends_": "Common_200_Response", | ||
"body": { | ||
"supplementary_data": { | ||
"new_case.orgID1": true | ||
} | ||
} | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
...pplementary_data new case in ES Search API/F-143_CreateCasePreRequisiteCaseworker.td.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"_guid_": "F-143_CreateCasePreRequisiteCaseworker", | ||
"_extends_": "Case_Creation_Data_Base", | ||
"specs": [ | ||
"to create a case", | ||
"As a prerequisite" | ||
], | ||
|
||
"prerequisites" : [ { | ||
"Token_Creation": "S-143_GetCreateToken" | ||
} | ||
], | ||
|
||
"users": { | ||
"invokingUser": { | ||
"_extends_": "BeftaMasterCaseworker" | ||
} | ||
}, | ||
"request": { | ||
"pathVariables": { | ||
"jid": "BEFTA_MASTER", | ||
"ctid": "FT_NewCaseSupplementry" | ||
}, | ||
"body": { | ||
"data": { | ||
"OrganisationPolicyField": { | ||
"newCase": "Yes", | ||
"Organisation": { | ||
"OrganisationID": "orgID1", | ||
"OrganisationName": "orgName1" | ||
} | ||
} | ||
}, | ||
"event": { | ||
"id": "createCase", | ||
"summary": "", | ||
"description": "" | ||
}, | ||
"event_token": "${[scenarioContext][childContexts][Token_Creation][testData][actualResponse][body][token]}" | ||
} | ||
}, | ||
|
||
"expectedResponse": { | ||
"body": { | ||
"id": "[[ANYTHING_PRESENT]]", | ||
"jurisdiction": "BEFTA_MASTER", | ||
"state" : "CaseCreated", | ||
"case_type_id": "FT_NewCaseSupplementry", | ||
"created_date": "[[ANYTHING_PRESENT]]", | ||
"last_modified": "[[ANYTHING_PRESENT]]", | ||
"last_state_modified_date": "[[ANYTHING_PRESENT]]", | ||
"security_classification": "PUBLIC", | ||
"case_data": { | ||
"OrganisationPolicyField": { | ||
"Organisation": { | ||
"OrganisationID": "orgID1", | ||
"OrganisationName": "orgName1" | ||
} | ||
} | ||
}, | ||
"data_classification": { | ||
}, | ||
"supplementary_data" : { | ||
"new_case" : { | ||
"orgID1" : true | ||
} | ||
} | ||
} | ||
} | ||
} |
124 changes: 124 additions & 0 deletions
124
...t/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.1.td.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
{ | ||
"_guid_": "S-143.1", | ||
"productName": "CCD Data Store Elastic Search API", | ||
"operationName": "Internal Elastic Search Endpoint", | ||
"method": "POST", | ||
"uri": "/internal/searchCases", | ||
"user" : { | ||
"_extends_": "BeftaMasterCaseworker" | ||
}, | ||
"specs": [ | ||
"a valid profile", | ||
"is configured to search for the previously created case", | ||
"does not explicitly request supplementary_data", | ||
"is using the query parameter use_case=orgcases", | ||
"contains the previously created case", | ||
"contains supplementary data" | ||
], | ||
"request": { | ||
"_extends_": "Common_Request", | ||
"queryParams": { | ||
"ctid": "FT_NewCaseSupplementry", | ||
"use_case": "ORGCASES" | ||
}, | ||
"body": { | ||
"native_es_query": { | ||
"query": { | ||
"match": { | ||
"reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
|
||
"expectedResponse": { | ||
"_extends_": "Common_200_Response", | ||
"body": { | ||
"headers": [ | ||
{ | ||
"__ordering__": "ordered" | ||
}, | ||
{ | ||
"metadata": { | ||
"jurisdiction": "BEFTA_MASTER", | ||
"case_type_id": "FT_NewCaseSupplementry" | ||
}, | ||
"fields": [ | ||
{ | ||
"__operator__": "equivalent", | ||
"__ordering__": "unordered", | ||
"__elementId__": "label" | ||
}, | ||
{ | ||
"label": "`FixedList` orgcases", | ||
"order": 1, | ||
"metadata": false, | ||
"case_field_id": "FixedListField", | ||
"case_field_type": { | ||
"id": "FixedList-FixedListType", | ||
"type": "FixedList", | ||
"min": null, | ||
"max": null, | ||
"regular_expression": null, | ||
"fixed_list_items": [{ | ||
"code" : "VALUE4", | ||
"label" : "Value 4", | ||
"order" : null | ||
}, | ||
{ | ||
"code": "VALUE3", | ||
"label": "Value 3", | ||
"order": null | ||
}, | ||
{ | ||
"code": "VALUE2", | ||
"label": "Value 2", | ||
"order": null | ||
}, | ||
{ | ||
"code": "VALUE1", | ||
"label": "Value 1", | ||
"order": null | ||
} | ||
], | ||
"complex_fields": [], | ||
"collection_field_type": null | ||
}, | ||
"display_context_parameter": null | ||
} | ||
], | ||
"cases": "[[ANYTHING_PRESENT]]" | ||
} | ||
], | ||
"cases": [ | ||
{ | ||
"fields": { | ||
"[JURISDICTION]": "BEFTA_MASTER", | ||
"[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", | ||
"[CREATED_DATE]": "[[ANYTHING_PRESENT]]", | ||
"[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", | ||
"[STATE]": "CaseCreated", | ||
"[SECURITY_CLASSIFICATION]": "PUBLIC", | ||
"[CASE_TYPE]": "FT_NewCaseSupplementry", | ||
"[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"case_id": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", | ||
"fields_formatted": { | ||
"[JURISDICTION]": "BEFTA_MASTER", | ||
"[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", | ||
"[CREATED_DATE]": "[[ANYTHING_PRESENT]]", | ||
"[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", | ||
"[STATE]": "CaseCreated", | ||
"[SECURITY_CLASSIFICATION]": "PUBLIC", | ||
"[CASE_TYPE]": "FT_NewCaseSupplementry", | ||
"[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"supplementary_data" : null | ||
} | ||
], | ||
"total": 1 | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be reverted upon merging