fix: Add more usable fieldtypes to group by (#22497)

- Autocomplete is same as select
- Dynamic link is same as link
- Date is useful too

Possible improvement `group by date(datetime)` (not part of this PR)
This commit is contained in:
Ankush Menat 2023-09-21 17:49:07 +05:30 committed by GitHub
parent 41d30e7213
commit 4888e85df1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -364,7 +364,16 @@ frappe.ui.GroupBy = class {
this.all_fields = {};
const fields = this.report_view.meta.fields.filter((f) =>
["Select", "Link", "Data", "Int", "Check"].includes(f.fieldtype)
[
"Select",
"Link",
"Data",
"Int",
"Check",
"Dynamic Link",
"Autocomplete",
"Date",
].includes(f.fieldtype)
);
const tag_field = { fieldname: "_user_tags", fieldtype: "Data", label: __("Tags") };
this.group_by_fields[this.doctype] = fields