Skip to content

Commit

Permalink
fix: set task status to Overdue when expected_end_date passes (#1830)
Browse files Browse the repository at this point in the history
* fix: set task status to Overdue when expected_end_date passes

* fix: set task status to Overdue when expected_end_date passes

* fix: set task status to Overdue when expected_end_date passes
  • Loading branch information
MyuddinKhatri authored Nov 29, 2021
1 parent 56758af commit 08f3504
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion erpnext/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@
"erpnext.crm.doctype.email_campaign.email_campaign.send_email_to_leads_or_contacts",
"erpnext.crm.doctype.email_campaign.email_campaign.set_email_campaign_status",
"erpnext.selling.doctype.quotation.quotation.set_expired_status",
"erpnext.stock.doctype.stock_entry.stock_entry.raw_material_update_on_bom"
"erpnext.stock.doctype.stock_entry.stock_entry.raw_material_update_on_bom",
"erpnext.projects.doctype.task.task.set_tasks_as_overdue"
],
"daily_long": [
"erpnext.setup.doctype.email_digest.email_digest.send",
Expand Down
2 changes: 1 addition & 1 deletion erpnext/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ erpnext.patches.v6_10.email_digest_default_quote
erpnext.patches.v6_10.fix_billed_amount_in_drop_ship_po
erpnext.patches.v6_10.fix_delivery_status_of_drop_ship_item #2015-12-08
erpnext.patches.v5_8.tax_rule #2015-12-08
erpnext.patches.v6_12.set_overdue_tasks
erpnext.patches.v6_12.set_overdue_tasks #2021-11-16
erpnext.patches.v6_16.update_billing_status_in_dn_and_pr
erpnext.patches.v6_16.create_manufacturer_records
execute:frappe.db.sql("update `tabPricing Rule` set title=name where title='' or title is null") #2016-01-27
Expand Down
3 changes: 3 additions & 0 deletions erpnext/projects/doctype/task/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ def update_status(self):
from datetime import datetime
if self.exp_end_date < datetime.now().date():
self.db_set('status', 'Overdue', update_modified=False)
for project in self.projects:
if project.is_default:
frappe.db.set_value("Task Project", project.name, "status", "Overdue")
self.update_project()

def notify(self):
Expand Down

0 comments on commit 08f3504

Please sign in to comment.