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

10571 : Add Docket Suffix to Custom Case Report Results #5664

Merged
merged 4 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export type CaseInventory = Pick<
| 'caseCaption'
| 'caseType'
| 'docketNumber'
| 'docketNumberWithSuffix'
| 'leadDocketNumber'
| 'preferredTrialCity'
| 'receivedAt'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ describe('createCsvCustomCaseReportFileInteractor', () => {
caseCaption: 'caseCaption',
caseType: CASE_TYPES_MAP.cdp,
docketNumber: 'docketNumber',
docketNumberWithSuffix: 'docketNumberWithSuffix',
highPriority: true,
preferredTrialCity: 'preferredTrialCity',
procedureType: '',
Expand Down Expand Up @@ -107,7 +108,7 @@ describe('createCsvCustomCaseReportFileInteractor', () => {

const saveFileAndGenerateUrlCalls = saveFileAndGenerateUrl.mock.calls;
const csvStringBuffer = Buffer.from(
`Docket No.,Date Created,Case Title,Case Status,Case Type,Judge,Requested Place of Trial,Calendaring High Priority\ndocketNumber,Invalid DateTime,caseCaption,${CASE_STATUS_TYPES.assignedCase},${CASE_TYPES_MAP.cdp},associatedJudge,preferredTrialCity,yes\n`,
`Docket No.,Date Created,Case Title,Case Status,Case Type,Judge,Requested Place of Trial,Calendaring High Priority\ndocketNumberWithSuffix,Invalid DateTime,caseCaption,${CASE_STATUS_TYPES.assignedCase},${CASE_TYPES_MAP.cdp},associatedJudge,preferredTrialCity,yes\n`,
);
const bomBuffer = Buffer.from([239, 187, 191]);

Expand Down Expand Up @@ -135,6 +136,7 @@ describe('createCsvCustomCaseReportFileInteractor', () => {
caseCaption: 'caseCaption\nextra line',
caseType: 'Deficiency',
docketNumber: 'docketNumber',
docketNumberWithSuffix: 'docketNumberWithSuffix',
highPriority: true,
preferredTrialCity: 'preferredTrialCity',
procedureType: '',
Expand Down Expand Up @@ -171,6 +173,7 @@ describe('createCsvCustomCaseReportFileInteractor', () => {
caseCaption: 'caseCaption, Petitioner',
caseType: CASE_TYPES_MAP.cdp,
docketNumber: 'docketNumber',
docketNumberWithSuffix: 'docketNumberWithSuffix',
highPriority: true,
preferredTrialCity: 'preferredTrialCity',
procedureType: '',
Expand All @@ -196,7 +199,7 @@ describe('createCsvCustomCaseReportFileInteractor', () => {
.filter(x => !!x);

expect(records[1]).toEqual(
`docketNumber,Invalid DateTime,caseCaption,${CASE_STATUS_TYPES.calendared},${CASE_TYPES_MAP.cdp},associatedJudge,preferredTrialCity,yes`,
`docketNumberWithSuffix,Invalid DateTime,caseCaption,${CASE_STATUS_TYPES.calendared},${CASE_TYPES_MAP.cdp},associatedJudge,preferredTrialCity,yes`,
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const createCsvCustomCaseReportFileInteractor = async (

const getCsvString = (records: any[]) => {
const CSV_DICTIONARY = [
{ header: 'Docket No.', key: 'docketNumber' },
{ header: 'Docket No.', key: 'docketNumberWithSuffix' },
{ header: 'Date Created', key: 'receivedAt' },
{ header: 'Case Title', key: 'caseCaption' },
{ header: 'Case Status', key: 'status' },
Expand Down
1 change: 1 addition & 0 deletions web-api/src/persistence/elasticsearch/getCasesByFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const getCasesByFilters = async ({
'caseCaption',
'caseType',
'docketNumber',
'docketNumberWithSuffix',
'leadDocketNumber',
'preferredTrialCity',
'receivedAt',
Expand Down
Loading