I have a customer request, on task list when standard filter list on project is apply, the additional filter (with the filter button) on Parent Task field have to suggest only tasks from the project previously filtered.
I wonder what is the bast way to do that in my customer app
1 - add a hook doctype_list_js = {“Task”: [“public/js/task_list.js”]} but still execute standard task_list.js to keep standard feature and try to intercept query (get_query) on parent_task filter. I try that but seems big hack to manage this (and I didn’t success to make it correctly for now)
2 - add a hook doctype_list_js = {“Task”: [“public/js/task_list.js”]} but still execute standard task_list.js to keep standard feature and add a special button with onload: function(listview) {listview.page.add_menu_item(__(“Special filter”), function() { “frappe.dialog with add_field({…}) that ask project and parent task filtered on project and send the filter resulting to the listview filter)”}, I didn’t try it yet but seems a better option
What would be your best way to do that ? Is there another way ?