Skip to content

Commit

Permalink
add clesedAt to sortField
Browse files Browse the repository at this point in the history
  • Loading branch information
js-jankisalvi committed Jul 19, 2023
1 parent 37c8cdc commit f5e92cc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions x-pack/plugins/cases/common/api/cases/case.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,15 @@ describe('Case', () => {
});
});

it('succeeds with closedAt as sortField', () => {
const query = CasesFindRequestRt.decode({ ...defaultRequest, sortField: 'closedAt' });

expect(query).toStrictEqual({
_tag: 'Right',
right: { ...defaultRequest, sortField: 'closedAt', page: 1, perPage: 10 },
});
});

it('succeeds with severity as sortField', () => {
const query = CasesFindRequestRt.decode({ ...defaultRequest, sortField: 'severity' });

Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/cases/common/api/cases/case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ const CasesFindRequestSortFieldsRt = rt.keyof({
category: null,
createdAt: null,
updatedAt: null,
closedAt: null,
status: null,
severity: null,
});
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/cases/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -3986,6 +3986,7 @@
"enum": [
"createdAt",
"updatedAt",
"closedAt",
"title",
"category",
"status",
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/cases/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2430,6 +2430,7 @@ components:
enum:
- createdAt
- updatedAt
- closedAt
- title
- category
- status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ schema:
enum:
- createdAt
- updatedAt
- closedAt
- title
- category
- status
Expand Down

0 comments on commit f5e92cc

Please sign in to comment.