Skip to content

Commit

Permalink
adjust deliveries query elims section for topic name
Browse files Browse the repository at this point in the history
  • Loading branch information
the-andrew committed Jan 21, 2025
1 parent 123fe85 commit fccf7f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class DatabaseDeliveryAccess(
REPORT_FILE.NEXT_ACTION.isNull
.and(REPORT_FILE.TRANSPORT_PARAMS.isNotNull)
.and(REPORT_FILE.TRANSPORT_RESULT.notLike("%downloadedBy%"))
.and(REPORT_FILE.SCHEMA_TOPIC.eq(Topic.ELR_ELIMS))
.and(REPORT_FILE.SCHEMA_TOPIC.equalIgnoreCase(Topic.ELR_ELIMS.jsonVal))
.and(REPORT_FILE.RECEIVING_ORG.eq(organization))
} else {
REPORT_FILE.NEXT_ACTION.eq(TaskAction.send)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class HistoryDatabaseAccessTests {
fun `test organizationFilter`() {
var conditionExpected = """
(
"public"."action"."action_name" = 'batch'
"public"."report_file"."next_action" = 'send'
and "public"."report_file"."receiving_org" = 'test'
and "public"."report_file"."receiving_org_svc" = 'test'
)
Expand All @@ -47,13 +47,10 @@ class HistoryDatabaseAccessTests {
fun `test organizationFilter with feature flag`() {
var conditionExpected = """
(
(
"public"."action"."action_name" = 'batch'
or (
"public"."action"."action_name" = 'send'
and "public"."report_file"."schema_topic" = 'ELR_ELIMS'
)
)
"public"."report_file"."next_action" is null
and "public"."report_file"."transport_params" is not null
and "public"."report_file"."transport_result" not like '%downloadedBy%'
and lower(cast("public"."report_file"."schema_topic" as varchar)) = lower('elr-elims')
and "public"."report_file"."receiving_org" = 'test'
and "public"."report_file"."receiving_org_svc" = 'test'
)
Expand Down

0 comments on commit fccf7f6

Please sign in to comment.