fix: Add project filter in parent task field (#22655)

* fix: Add project filter in parent task field
This commit is contained in:
Afshan 2020-07-11 21:54:54 +05:30 committed by GitHub
parent 1ab228b52e
commit 83cd1dcc44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,10 +29,16 @@ frappe.ui.form.on("Task", {
filters: filters
};
})
},
refresh: function (frm) {
frm.set_query("parent_task", { "is_group": 1 });
frm.set_query("parent_task", function () {
let filters = {
"is_group": 1
};
if (frm.doc.project) filters["project"] = frm.doc.project;
return {
filters: filters
}
});
},
is_group: function (frm) {