Open freddyDOTCMS opened 1 month ago
This issue is NOT reproducible anymore. The OR
logical operator is working as expected.
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 <GET-YOUR-OWN-FILE-ASSET-URL-FROM-CUBEJS>
with something similar to this: /dA/716dcfa9-537d-419a-837f-73084a499cf3/fileAsset/1200w/50q/bg-footer.jpg
Approved: Tested on trunk_a12617a, Docker, macOS 14.5, FF v126.0.1
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
Start dotCMS with the full starter
Start Analytics to this just: Go to ""/core/docker/docker-compose-examples/analytics"" and run the command "docker-compose up", and wait a couple of minutes, Configure the Analitycs App in dotCMS with the follow parameters:
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"],
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