-
Notifications
You must be signed in to change notification settings - Fork 467
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
Support Or logic operator in CA Query filters #30190
Labels
Comments
freddyDOTCMS
added
Type : Defect
dotCMS : Analytics
Data and Analytics Umbrella
Team : Falcon
labels
Sep 30, 2024
This was referenced Sep 30, 2024
This issue is NOT reproducible anymore. The |
NOTE TO QA:In order to test this, click around the pages in the front-end. Then, you can create a test HTML Page and add a Code Snippet to it with the following code: #set ($queryMap = {"measures" : ["request.count"],
"orders": "request.count desc",
"dimensions":["request.url"],
"filters":"request.whatAmI = ['PAGE'] or request.url = ['<GET-YOUR-OWN-FILE-ASSET-URL-FROM-CUBEJS>']"
})
#set($collection = $analytics.runReportFromMap($queryMap).getResults())
<h2>Accessed Pages</h2>
#foreach($item in $collection)
<ul>
<li>URL: $item.get("request.url").get()</li>
<li>Count: $item.get("request.count").get()</li>
</ul>
#end Replace the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Parent Issue
#30141
Problem Statement
We create a new query sintax for the CA Endpoint and ViewTool, is not really the same CubeJs syntax, let see an example on the filter attribute:
Example to get all the request for any PAGE or for the URL equals to something like '/dA/716dcfa9-537d-419a-837f-73084a499cf3/fileAsset/1200w/50q/bg-footer.jpg', the CubeJS query look like:
In our less verbose Syntax:
It is failing because it translate it like to different filters in the filters attribute and it is a AND.
Steps to Reproduce
Navigate in the dotCMS FE to the Home Page this is going to include request to '/dA/716dcfa9-537d-419a-837f-73084a499cf3/fileAsset/1200w/50q/bg-footer.jpg'.
GO to the Velocity playground and run this code
#set ($queryMap = {"measures" : ["request.count"],
"orders": "request.count desc",
"dimensions":["request.url"],
"filters":"request.whatAmI = ['PAGE'] OR request.url = ['/dA/716dcfa9-537d-419a-837f-73084a499cf3/fileAsset/1200w/50q/bg-footer.jpg']"
})
#set($collection = $analytics.runReportFromMap($queryMap).getResults())
Accessed Pages
#foreach($item in $collection)
-> URL: $item.get("request.url").get()
-> Count: $item.get("request.count").get()
#end
You must be request to both the FIle and the Home Page
Acceptance Criteria
Make the Or filter works when we retrieve CA data
dotCMS Version
latest
Proposed Objective
Core Features
Proposed Priority
Priority 2 - Important
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response
The text was updated successfully, but these errors were encountered: