Skip to content
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

feat(unidirectional-camel-case): Make seatool non-case sensitive when writing to opensearch #958

Merged
merged 9 commits into from
Jan 10, 2025
12 changes: 7 additions & 5 deletions lib/packages/shared-types/opensearch/main/transforms/seatool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ const compileSrtList = (
): { name: string; email: string }[] =>
officers?.length
? officers.map((o) => ({
name: `${o.FIRST_NAME || ""} ${o.LAST_NAME || ""}`,
email: o.EMAIL || "",
}))
name: `${o.FIRST_NAME} ${o.LAST_NAME}`,
email: o.EMAIL,
}))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change lines 82-84 to align with what is on main. I don't think this should be different from what is on main. After that I think we are good to have this tested

: [];

const getFinalDispositionDate = (status: string, record: SeaTool) => {
Expand Down Expand Up @@ -124,11 +124,13 @@ export const transform = (id: string) => {
: null;

const { stateStatus, cmsStatus } = getStatus(seatoolStatus);

const resp = {
id,
id: id.toUpperCase(),
actionType: data.ACTIONTYPES?.[0].ACTION_NAME,
approvedEffectiveDate: getDateStringOrNullFromEpoc(
data.STATE_PLAN.APPROVED_EFFECTIVE_DATE || data.STATE_PLAN.ACTUAL_EFFECTIVE_DATE,
data.STATE_PLAN.APPROVED_EFFECTIVE_DATE ||
data.STATE_PLAN.ACTUAL_EFFECTIVE_DATE,
),
changed_date: data.STATE_PLAN.CHANGED_DATE,
description: data.STATE_PLAN.SUMMARY_MEMO,
Expand Down
Loading