From 4e49f0f0ca04bb1e3feb8efe3047c28d99e7a6a1 Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 12 Nov 2020 15:26:24 +0530 Subject: [PATCH] fix: show only link, dynamic link and data fields --- frappe/automation/doctype/assignment_rule/assignment_rule.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/automation/doctype/assignment_rule/assignment_rule.js b/frappe/automation/doctype/assignment_rule/assignment_rule.js index e6f136fe62..ee1a076465 100644 --- a/frappe/automation/doctype/assignment_rule/assignment_rule.js +++ b/frappe/automation/doctype/assignment_rule/assignment_rule.js @@ -57,7 +57,8 @@ frappe.ui.form.on('Assignment Rule', { frm.set_fields_as_options( 'field', doctype, - () => true, + (df) => ['Dynamic Link', 'Data'].includes(df.fieldtype) + || (df.fieldtype == 'Link' && df.options == 'User'), [{ label: 'Owner', value: 'owner' }] ); if (doctype) {