From ff6ea5cb0d09b981c293b35c5519561344d02ecb Mon Sep 17 00:00:00 2001 From: objecttothis <17935339+objecttothis@users.noreply.github.com> Date: Fri, 23 Oct 2026 16:27:22 +0400 Subject: [PATCH] fix(report_tables): match reports path anywhere in pathname for export Remove anchored `^` from regex matching `/reports/:id` segment when building export-all URL. Pathname may be prefixed (e.g. locale or base path segment before `/reports/...`), so anchoring to start of string caused match to fail and export link to be built incorrectly. Unanchored pattern finds reports segment regardless of position. Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com> --- public/js/report_tables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/report_tables.js b/public/js/report_tables.js index 691a0b388..0298e009b 100644 --- a/public/js/report_tables.js +++ b/public/js/report_tables.js @@ -62,7 +62,7 @@ const report_export_toggle = (function () { $exportItem.closest('.dropdown-menu').prev('[data-toggle="dropdown"]').dropdown('toggle'); - const path = location.pathname.replace(/^(\/reports\/[^/]+)/, '$1/exportAll/' + format); + const path = location.pathname.replace(/(\/reports\/[^/]+)/, '$1/exportAll/' + format); window.location = path + location.search; }, true); };