hello guys , i am writing this script to make the current user see only the issues assigned to him:
frappe.ui.form.on(‘Issue’, {
refresh: function(frm) {
cur_frm.fields_dict[‘issues’].grid.get_field(‘assigned_to’).get_query = function() {
return {
filters: [
[‘User’, ‘name’, ‘=’, frappe.session.user]
]
}
}
// Make the filter read-only
cur_frm.fields_dict['issues'].grid.get_field('assigned_to').read_only = 1;
}
});
and it did not work .
i could use some help please .
Thank You!