lilila edited a comment on issue #10817:
URL:
https://github.com/apache/incubator-superset/issues/10817#issuecomment-740766590
Dear @oashton ,
I wrote this lite patch to get annotation considering extra_filters in
Explore view as well.
I add these lines at line 260 in your screenshot
```
//case for explore view (have extra params given to annotation)
var new_extra_from_adhoc = [];
if (!fd.extra_filters && fd.adhoc_filters){
for(var i=0; i<fd.adhoc_filters.length; i++){
if (fd.adhoc_filters[i]['isExtra']){
var new_extra = {"col":fd.adhoc_filters[i]['subject'],
"op": fd.adhoc_filters[i]['operator'],
"val":
fd.adhoc_filters[i]['comparator']};
new_extra_from_adhoc.push(new_extra);}
}
sliceFormData.extra_filters = new_extra_from_adhoc;
}
```
@villebro , I don't know if you remember but we discussed this point.
The problem was that in explore mode, extra_filters are already merge with
adhoc filters so they were not passed to the annotations. The code snippet
(sorry for the quality I never code in Javascript) simply recreates the
extra_filters from the adhoc_filters available in Explore mode
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]