michael-s-molina commented on code in PR #25156:
URL: https://github.com/apache/superset/pull/25156#discussion_r1313333769


##########
superset-frontend/src/explore/actions/saveModalActions.js:
##########
@@ -79,19 +79,15 @@ export const getSlicePayload = (
     adhocFilters = extractAddHocFiltersFromFormData(formDataFromSlice);
   }
 
-  if (
-    isEmpty(adhocFilters?.adhoc_filters) &&
-    isEmpty(formDataFromSlice) &&
-    formDataWithNativeFilters?.adhoc_filters?.[0]?.operator ===
-      Operators.TEMPORAL_RANGE
-  ) {
-    adhocFilters.adhoc_filters = [
-      {
-        ...formDataWithNativeFilters.adhoc_filters[0],
-        comparator: 'No filter',
-      },
-    ];
-  }
+  // This loop iterates through the adhoc_filters array in 
formDataWithNativeFilters.
+  // If a filter is of type TEMPORAL_RANGE and isExtra, it sets its comparator 
to
+  // 'No filter' and adds the modified filter to the adhocFilters array. This 
ensures that all
+  // TEMPORAL_RANGE filters are converted to 'No filter' when saving a chart.
+  formDataWithNativeFilters?.adhoc_filters?.forEach(filter => {

Review Comment:
   Sorry, I'm not sure if I was clear. What I mean is, does your change also 
preserves the fixes that were made in those PRs? 
   - Creating a new chart with dashboard time filters but filter can't apply 
again 
   - Invalid "No Filter" applied



-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to