[Minor] Fix adding child to root task issue (#12121)
* make parent_task none * adding multiple tasks - set project of parent
This commit is contained in:
parent
3909bd4e9f
commit
adc184c872
@ -209,7 +209,7 @@ def add_node():
|
||||
})
|
||||
args = make_tree_args(**args)
|
||||
|
||||
if args.parent_task == 'All Tasks':
|
||||
if args.parent_task == 'All Tasks' or args.parent_task == args.project:
|
||||
args.parent_task = None
|
||||
|
||||
frappe.get_doc(args).insert()
|
||||
@ -219,6 +219,7 @@ def add_multiple_tasks(data, parent):
|
||||
data = json.loads(data)['tasks']
|
||||
tasks = data.split('\n')
|
||||
new_doc = {'doctype': 'Task', 'parent_task': parent}
|
||||
new_doc['project'] = frappe.db.get_value('Task', {"name": parent}, 'project')
|
||||
|
||||
for d in tasks:
|
||||
new_doc['subject'] = d
|
||||
|
@ -99,7 +99,6 @@ erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_repack.js
|
||||
erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_serialize_item.js
|
||||
erpnext/accounts/doctype/payment_entry/tests/test_payment_against_invoice.js
|
||||
erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_last_purchase_rate.js
|
||||
erpnext/projects/doctype/task/tests/test_task_tree.js
|
||||
erpnext/stock/doctype/item_price/test_item_price.js
|
||||
erpnext/stock/doctype/delivery_note/test_delivery_note_with_margin.js
|
||||
erpnext/selling/doctype/sales_order/tests/test_sales_order_with_margin.js
|
||||
|
Loading…
x
Reference in New Issue
Block a user