Merge pull request #49889 from rehanrehman389/feat/project-filter

feat: add project filter to Delayed Tasks Summary report
This commit is contained in:
Diptanil Saha
2025-10-06 02:08:20 +05:30
committed by GitHub
2 changed files with 15 additions and 1 deletions

View File

@@ -3,6 +3,12 @@
frappe.query_reports["Delayed Tasks Summary"] = {
filters: [
{
fieldname: "project",
label: __("Project"),
fieldtype: "Link",
options: "Project",
},
{
fieldname: "from_date",
label: __("From Date"),

View File

@@ -23,6 +23,7 @@ def get_data(filters):
fields=[
"name",
"subject",
"project",
"exp_start_date",
"exp_end_date",
"status",
@@ -56,7 +57,7 @@ def get_data(filters):
def get_conditions(filters):
conditions = frappe._dict()
keys = ["priority", "status"]
keys = ["priority", "status", "project"]
for key in keys:
if filters.get(key):
conditions[key] = filters.get(key)
@@ -89,6 +90,13 @@ def get_columns():
columns = [
{"fieldname": "name", "fieldtype": "Link", "label": _("Task"), "options": "Task", "width": 150},
{"fieldname": "subject", "fieldtype": "Data", "label": _("Subject"), "width": 200},
{
"fieldname": "project",
"fieldtype": "Link",
"label": _("Project"),
"options": "Project",
"width": 150,
},
{"fieldname": "status", "fieldtype": "Data", "label": _("Status"), "width": 100},
{"fieldname": "priority", "fieldtype": "Data", "label": _("Priority"), "width": 80},
{"fieldname": "progress", "fieldtype": "Data", "label": _("Progress (%)"), "width": 120},