In Process Portal, how can I redirect to a Custom Dashboard when a task gets completed?

The application has a custom dashboard service(Heritage). On click of a button in the dashboard service, a task gets opened via
window.open("taskUrl") in the same window. The task which gets opened is a heritage human service and has a
postpone task when it gets submitted.
The issue is : In 8.5.6 , there was a 'Restart' button which took the
user back to the dashboard but in 8.5.7 the task completed page which
states "The service has finished" pops up.