[ANALYTICS-111] Single Filter cannot be used in more than one data supplier Created: 24/Oct/19 Updated: 25/Mar/20 Resolved: 02/Mar/20 |
|
| Status: | Closed |
| Project: | Analytics |
| Component/s: | None |
| Affects Version/s: | 1.0 |
| Fix Version/s: | 1.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Edwin Guilbert | Assignee: | Chuong Doan Huy |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 2.75d | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Magnolia 6.1.2 |
||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: | |
| Epic Link: | Analytics. Further connectors |
| Sprint: | Add-Ons 32 |
| Story Points: | 3 |
| Description |
|
In a dashboard definition if I want to use the same filter for two data suppliers the only one gets the filter's value. For example:
dataSuppliers:
mostPublishingUsersSupplier:
class: info.magnolia.dashboards.datasource.MostPublishingUsersDataSupplier
parameters:
workspace: tours
mostActivatedContentSupplier:
class: info.magnolia.dashboards.datasource.MostActivatedContentDataSupplier
parameters:
workspace: tours
filterFields:
- name: workspace
label: Workspace
class: info.magnolia.ui.form.field.definition.TextFieldDefinition
Only the first data supplier registered (MostPublishingUsersDataSupplier) will get the workspace filter value. The second data supplier won't get any value.
AC
You can find the full example here: (I had to use 2 different filters for workspace to make it work) https://git.magnolia-cms.com/projects/SERVICES/repos/dashboards-admin |
| Comments |
| Comment by Chuong Doan Huy [ 05/Mar/20 ] |
|
Hi ebguilbert, 1/ I checked and saw that one filter can populate to 2 data suppliers. I checked with Google and Matomo in Analytics module as well as clone two of your date suppliers and put into Anaylytics, they both get filter param. Can you check again on latest Analytics code (i test on magnolia 6.2). 2/ I also refactored the code so that any AbstractDataSupplier now can get parameters, filter parameters... |
| Comment by Edwin Guilbert [ 20/Mar/20 ] |
|
Hi chuong.doan, I just checked with the code described in this ticket and Im still facing the same issue. The workspace filter is only seen by one data supplier: mostPublishingUsersSupplier in this case. Using analytics 1.1-snapshot. |
| Comment by Chuong Doan Huy [ 25/Mar/20 ] |
|
Hi ebguilbert, I can only see this issue for these two cases :
To disable cache, edit config.yaml file of Analytics module, set "enabled" to false to make sure cache is not affecting your changes. I got your code but could not find parent artifact dashboards-demo, so i temporary change it to be a child module of Analytics to test ( i pushed my test branch already, will remove it soon) Can you verify with my branch (due to using Analytics 1.1-snapshot, dx-core 6.2 needed). We can also contact directly via slack for faster communication, thanks |
| Comment by Edwin Guilbert [ 25/Mar/20 ] |
|
Just tested your branch. You were right, it was the first point you mentioned. I had a mistake in my YAML and the parameter name was wrong. I fixed it now so both data suppliers use the same parameter name but it still doesnt work. If both suppliers are using the same parameter name then the second supplier doesn't get called at all (I even debugged it and nothing) |