This commit is contained in:
parent
3957ac1408
commit
10aab65338
@ -212,10 +212,10 @@ def set_multiple_status(names, status):
|
||||
task.save()
|
||||
|
||||
def set_tasks_as_overdue():
|
||||
tasks = frappe.get_all("Task", filters={'status':['not in',['Cancelled', 'Closed']]})
|
||||
tasks = frappe.get_all("Task", filters={"status": ["not in", ["Cancelled", "Completed"]]}, fields=["name", "status", "review_date"])
|
||||
for task in tasks:
|
||||
if frappe.db.get_value("Task", task.name, "status") in 'Pending Review':
|
||||
if getdate(frappe.db.get_value("Task", task.name, "review_date")) < getdate(today()):
|
||||
if task.status == "Pending Review":
|
||||
if getdate(task.review_date) > getdate(today()):
|
||||
continue
|
||||
frappe.get_doc("Task", task.name).update_status()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user