Skip to content

Commit

Permalink
Fixing caseIds issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-buttner committed Apr 10, 2023
1 parent 5dcff33 commit 97bed79
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x-pack/plugins/cases/server/telemetry/queries/cases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ const getCommentsSavedObjectTelemetry = async (
externalReferenceTypes: {
terms: {
field: `${CASE_COMMENT_SAVED_OBJECT}.attributes.externalReferenceAttachmentTypeId`,
size: 10,
},
aggs: {
...getMaxBucketOnCaseAggregationQuery(CASE_COMMENT_SAVED_OBJECT),
Expand All @@ -242,6 +243,7 @@ const getCommentsSavedObjectTelemetry = async (
persistableReferenceTypes: {
terms: {
field: `${CASE_COMMENT_SAVED_OBJECT}.attributes.persistableStateAttachmentTypeId`,
size: 10,
},
aggs: {
...getMaxBucketOnCaseAggregationQuery(CASE_COMMENT_SAVED_OBJECT),
Expand Down Expand Up @@ -320,7 +322,7 @@ const getFilesTelemetry = async (
{}
);

const filterCaseIdExists = fromKueryExpression(`${FILE_SO_TYPE}.attributes.Meta.caseId: *`);
const filterCaseIdExists = fromKueryExpression(`${FILE_SO_TYPE}.attributes.Meta.caseIds: *`);

return savedObjectsClient.find<unknown, FileAttachmentAggregationResults>({
page: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4995,6 +4995,15 @@
},
"total": {
"type": "long"
},
"topMimeTypes": {
"type": "array",
"items": {
"properties": {
"name": "keyword",
"count": "long"
}
}
}
}
}
Expand Down Expand Up @@ -5082,6 +5091,15 @@
},
"total": {
"type": "long"
},
"topMimeTypes": {
"type": "array",
"items": {
"properties": {
"name": "keyword",
"count": "long"
}
}
}
}
}
Expand Down Expand Up @@ -5169,6 +5187,15 @@
},
"total": {
"type": "long"
},
"topMimeTypes": {
"type": "array",
"items": {
"properties": {
"name": "keyword",
"count": "long"
}
}
}
}
}
Expand Down

0 comments on commit 97bed79

Please sign in to comment.