diff --git a/erpnext/public/js/projects/timer.js b/erpnext/public/js/projects/timer.js index 8370cc6ffff..3000320644e 100644 --- a/erpnext/public/js/projects/timer.js +++ b/erpnext/public/js/projects/timer.js @@ -18,7 +18,6 @@ erpnext.timesheet.timer = function (frm, row, timestamp = 0) { { fieldtype: "HTML", fieldname: "timer_html" }, ], }); - if (row) { dialog.set_values({ activity_type: row.activity_type, @@ -26,6 +25,10 @@ erpnext.timesheet.timer = function (frm, row, timestamp = 0) { task: row.task, expected_hours: row.expected_hours, }); + } else { + dialog.set_values({ + project: frm.doc.parent_project, + }); } dialog.get_field("timer_html").$wrapper.append(get_timer_html()); function get_timer_html() {