Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964

Danielc1fd1cebef84
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index eddce99a18..41c47c9aa8 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -1572,12 +1572,14 @@ func genAttrViewViewGroups(view *av.View, attrView *av.AttributeView) {
groupName = groupNameToday
} else if contentTime.Equal(now.AddDate(0, 0, 1)) {
groupName = groupNameTomorrow
- } else if contentTime.Before(now.AddDate(0, 0, 7)) {
- groupName = groupNameNext7Days
- } else if contentTime.Before(now.AddDate(0, 0, 30)) {
+ } else if contentTime.After(now.AddDate(0, 0, 30)) {
+ groupName = contentTime.Format("2006-01")
+ } else if contentTime.After(now.AddDate(0, 0, 7)) {
groupName = groupNameNext30Days
+ } else if contentTime.After(now.AddDate(0, 0, 1)) {
+ groupName = groupNameNext7Days
} else {
- groupName = contentTime.Format("2006-01")
+ groupName = notInRange
}
}
}