I recently encountered an issue with filters being malformed when making updates to a custom report. These malformed filter strings result in unfiltered custom reports.
Here’s what I am able to reproduce:
Context
I have a Custom Report that filters out values like '(not set)'
. This custom report is producing correct filtered results
Here is the JSON from organizations.reports.get (Method: organizations.reports.get | Apigee | Google Cloud)
Here we can see what the filter string is set to
{
"name": "xxxxxxxxxxxxxxxxxx",
"displayName": "Ricardo Test",
"metrics": [
{
"name": "message_count",
"function": "sum"
}
],
"dimensions": [
"developer_email",
"dc_path"
],
"filter": "(developer_email ne '(not set)' and dc_path ne '(not set)' and dc_path ne 'unknown' )",
"createdAt": "1755204429629",
"lastModifiedAt": "1755289475729",
"properties": [
{
"value": [
{
"value": "foobar"
}
]
}
],
"chartType": "column",
"organization": "xxxxxxxxxxxx"
}
Issue
However, when I go to edit the custom report on the cloud console ui The filters on the cloud console ui are malformed, even though the custom report is technically still working appropriately.
Unfortunately, making any update on this ui like adding a new dimension or just updating the description breaks the filter.
Here is the JSON response from the same organizations.reports.get after updating the description to "foobarbaz"
{
"name": "xxxxxxxxx",
"displayName": "Ricardo Test",
"metrics": [
{
"name": "message_count",
"function": "sum"
}
],
"dimensions": [
"developer_email",
"dc_path"
],
"filter": "(developer_email ne '(not set and dc_path ne (not set and dc_path ne unknown')",
"createdAt": "1755204429629",
"lastModifiedAt": "1755290528328",
"properties": [
{
"value": [
{
"value": "foobarbaz"
}
]
}
],
"chartType": "column",
"organization": "xxxxxx"
}
Now the filter string is malformed, and thus results in a unfiltered custom report
The same report that is looking at the same environment, during the same time frame not produces unfiltered results (seeing ‘(not set)’)
Has anyone else reported/run into this?