mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 16:15:02 +00:00
Merge pull request #49889 from rehanrehman389/feat/project-filter
feat: add project filter to Delayed Tasks Summary report
This commit is contained in:
@@ -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"),
|
||||
|
||||
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user