Workspace link to script report is set to wrong URL

I’ve got a script report that I want to be accessible directly from the desk. I have therefore created a new workspace of type link, set the link to be of type report and set the report to be my script report. The link appears on the desk, however when clicking it, it leads me to the URL that my report would have had if it were a report builder report (/app/doctype-of-report/view/report/my-report), not a script report (/app/query-report/my-report). I have confirmed that the latter URL works fine, however the one that is actually set leads to a blank page. Is there a way to edit the URL that is set? And should I open a Github issue for this? Thanks for the help in advance!

@iron3oxide I am facing the same issue currently. Any solutions for this??

The easiest solution would be to upgrade to v16, the routing seems to be fixed there. Alternatively, you’ll probably have to write some custom JS in your public folder and bundle it with your app. An example would be:

frappe.router.on('change', () => {
    const route = frappe.get_route();
    if !route.includes("query-report")
        && (
            route.includes("NameOfYourFirstScriptReport")
            || route.includes("NameOfYourSecondScriptReport")
        )
    ) {
        report_name = route.at(-1);
        frappe.set_route(["query-report", report_name]);
    }
})

@iron3oxide Thanks for the reply. As of now won’t be able to upgrade to V16 because we have customized(rebranded) our site a lot and are having active clients. Therefore if I upgrade to V16 then many customizations will be gone.

Thanks for your code solution. The solution which I applied and worked for me was inserting single link to the card at a time and then save the workspace. I repeated this process for all the links to resolve the issue.