ayush-sharaf commented on code in PR #39708:
URL: https://github.com/apache/superset/pull/39708#discussion_r3236379953


##########
superset/commands/report/execute.py:
##########
@@ -362,15 +362,14 @@ def _get_tabs_urls(
         """
         Get multple tabs urls
         """
+        parent_state = self._report_schedule.extra.get("dashboard") or {}
         return [
             self._get_tab_url(
                 {
                     "anchor": tab_anchor,
-                    "dataMask": None,
-                    "activeTabs": None,
-                    "urlParams": [
-                        ["native_filters", native_filter_params]  # type: 
ignore
-                    ],
+                    "dataMask": parent_state.get("dataMask"),
+                    "activeTabs": parent_state.get("activeTabs"),
+                    "urlParams": parent_state.get("urlParams")

Review Comment:
   Addressed on the rebased branch. `_get_tabs_urls()` now merges the fresh 
`native_filters` value into each tab permalinks existing `urlParams`, preserves 
unrelated params, and avoids stale `native_filters` entries. I also added 
regression coverage in `tests/unit_tests/commands/report/execute_test.py` for 
the tabbed path. Pushed in `7e4680fa1b`.



##########
superset/commands/report/execute.py:
##########
@@ -362,15 +362,14 @@ def _get_tabs_urls(
         """
         Get multple tabs urls
         """
+        parent_state = self._report_schedule.extra.get("dashboard") or {}
         return [
             self._get_tab_url(
                 {
                     "anchor": tab_anchor,
-                    "dataMask": None,
-                    "activeTabs": None,
-                    "urlParams": [
-                        ["native_filters", native_filter_params]  # type: 
ignore
-                    ],
+                    "dataMask": parent_state.get("dataMask"),
+                    "activeTabs": parent_state.get("activeTabs"),
+                    "urlParams": parent_state.get("urlParams")
                 },
                 user_friendly=user_friendly,

Review Comment:
   Addressed on the rebased branch. `native_filter_params` is now merged into 
each tab permalinks `urlParams` instead of being dropped, and the tabbed path 
has explicit regression coverage in 
`tests/unit_tests/commands/report/execute_test.py`. Pushed in `7e4680fa1b`.



##########
superset/commands/report/execute.py:
##########
@@ -362,15 +362,14 @@ def _get_tabs_urls(
         """
         Get multple tabs urls
         """
+        parent_state = self._report_schedule.extra.get("dashboard") or {}
         return [
             self._get_tab_url(
                 {
                     "anchor": tab_anchor,
-                    "dataMask": None,
-                    "activeTabs": None,
-                    "urlParams": [
-                        ["native_filters", native_filter_params]  # type: 
ignore
-                    ],
+                    "dataMask": parent_state.get("dataMask"),
+                    "activeTabs": parent_state.get("activeTabs"),
+                    "urlParams": parent_state.get("urlParams")
                 },

Review Comment:
   Addressed on the rebased branch. The tab permalink path now mirrors the 
single-tab merge behavior by refreshing `native_filters` inside each tab states 
`urlParams` while preserving any existing non-filter params. I also added 
regression tests covering preserved params and stale `native_filters` 
replacement. Pushed in `7e4680fa1b`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to