Skip to content

Commit 9990475

Browse files
authored
fix CloseStatus value in query string (#541)
* fix CloseStatus value in query string * fix unit test for query string builder
1 parent 470d253 commit 9990475

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

server/router/helpers/build-query-string.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const buildQueryString = (
3232
`${filterBy} >= "${startTime.toISOString()}"`,
3333
`${filterBy} <= "${endTime.toISOString()}"`,
3434
state === 'open' && `CloseTime = missing`,
35-
status && `CloseStatus = "${status}"`,
35+
status && `CloseStatus = ${status}`,
3636
isCron !== undefined && `IsCron = "${isCron}"`,
3737
workflowId && `WorkflowID = "${workflowId}"`,
3838
workflowName && `WorkflowType = "${workflowName}"`,

server/router/helpers/build-query-string.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ describe('buildQueryString', () => {
101101
});
102102

103103
describe('status = "Completed"', () => {
104-
const status = 'Completed';
104+
const status = 1;
105105

106-
it('should return "CloseTime >= "2021-06-03T00:00:00.000Z" and CloseTime <= "2021-06-04T00:00:00.000Z" and CloseStatus = "Completed"".', () => {
106+
it('should return "CloseTime >= "2021-06-03T00:00:00.000Z" and CloseTime <= "2021-06-04T00:00:00.000Z" and CloseStatus = 1".', () => {
107107
const output = buildQueryString(startTime, endTime, { status });
108108

109109
expect(output).toEqual(
110-
'CloseTime >= "2021-06-03T00:00:00.000Z" and CloseTime <= "2021-06-04T00:00:00.000Z" and CloseStatus = "Completed"'
110+
'CloseTime >= "2021-06-03T00:00:00.000Z" and CloseTime <= "2021-06-04T00:00:00.000Z" and CloseStatus = 1'
111111
);
112112
});
113113
});

0 commit comments

Comments
 (0)