Habits and Summaries: Output doesn't include total and average
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Bắt đầu với lệnh progressUpdate và cách xử lý các thiết lập periodStatsMentionsTotal và periodStatsMentionsAverage. Sử dụng cấu hình Plugin Console được cung cấp để tái hiện đầu ra hàng tuần, sau đó so sánh với định dạng số lượng, tổng và trung bình được hiển thị trong README. Hoàn tất khi một @mention tạo ra đầu ra kết hợp như mong đợi mà không có các mention lặp lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Checks
- I confirm I have restarted NotePlan and this problem still persists.
- I confirm I have reinstalled the Plugin and this problem still persists.
- Is this a repeatable problem?
System
- Device OS: MacOS Sonoma 14.5
- NotePlan Version: 3.15.2
- Plugin Name & Version: Habits & Summaries v0.22.1
Describe the bug
The output doesn't include the total and average as shown in the plugins Readme. If I add a @mention to average it will only show the average. I can see the total if I add the @mention to the items to total in the settings. However, the @mention is then repeated in the output: once for the average and once for the total. This is different that than showing in the single line as displayed in the Readme.
What do you expect it to do instead?
I expect it to show the @mention with a count, total, and average as shown in Readme.
To Reproduce
Add an @mention to the plugins setting.
Screenshots
Plugin Console Log
To provide us with more clues about where the bug/error is occurring...
- Open the Plugin's Preferences by going to
NotePlan's menu > Preferences > Pluginsand clicking the settings "cog" icon next to the plugin in question. Scroll to the bottom and set the logging level to "DEBUG" and click "Save & Close" - Now open the Plugin Console by going to
Noteplan > Help > Plugin Console(not the macOS Console app). - Run the plugin command you're reporting
- Copy the output from the Plugin Console and paste it below
- Delete any output that has personal information you don't want in there
Executing function 'progressUpdate'
2025-01-06 09:56:39 | DEBUG | jgclark.Summaries v0.22.1 :: progressUpdate (from template or callback): Starting with params '{"excludeToday":false,"progressHeading":"Metrics","showSparklines":true,"period":"wtd"}' (type: string) and source ''
2025-01-06 09:56:39 | DEBUG | jgclark.Summaries v0.22.1 :: - source determined to be 'callback'
2025-01-06 09:56:39 | DEBUG | jgclark.Summaries v0.22.1 :: makeProgressUpdate: Starting with params '{"excludeToday":false,"progressHeading":"Metrics","showSparklines":true,"period":"wtd"}' (type: string) from source 'callback'
2025-01-06 09:56:39 | DEBUG | - config after overriding with params-as-JSON-string '{"excludeToday":false,"progressHeading":"Metrics","showSparklines":true,"period":"wtd"}' (from callback) :: {
"progressHeading": "Metrics",
"periodStatsYesNo": [
"@health/take_vitamins"
],
"progressPeriod": "wtd",
"weeklyStatsDuration": 26,
"statsHeading": "Period Stats",
"periodStatsMentions": [],
"showAsHashtagOrMention": true,
"periodStatsMentionsTotal": [
"@health/drink_water",
"@health/slept",
"@actions/planned",
"@actions/added",
"@actions/completed",
"@actions/cancelled",
"@health/activity_movement",
"@health/activity_exercise",
"@health/activity_stand"
],
"periodStatsShowSparklines": true,
"progressMentionsAverage": [
"@health/drink_water",
"@health/heart_rate",
"@health/respiratory_rate",
"@health/wrist_temperature",
"@health/blood_oxygen",
"@health/slept",
"@health/morning_energy",
"@health/morning_mood",
"@health/morning_pain",
"@actions/planned",
"@actions/added",
"@actions/completed",
"@actions/cancelled",
"@health/activity_movement",
"@health/activity_exercise",
"@health/activity_stand",
"@health/evening_energy",
"@health/evening_mood",
"@health/evening_pain"
],
"includeHashtags": [],
"periodStatsMentionsAverage": [
"@health/drink_water",
"@health/heart_rate",
"@health/respiratory_rate",
"@health/wrist_temperature",
"@health/blood_oxygen",
"@health/slept",
"@health/morning_energy",
"@health/morning_mood",
"@health/morning_pain",
"@actions/planned",
"@actions/added",
"@actions/completed",
"@actions/cancelled",
"@health/activity_movement",
"@health/activity_exercise",
"@health/activity_stand",
"@health/evening_energy",
"@health/evening_mood",
"@health/evening_pain"
],
"folderToStore": "Summaries",
"showSparklines": true,
"progressMentionsTotal": [
"@health/drink_water",
"@health/slept",
"@actions/planned",
"@actions/added",
"@actions/completed",
"@actions/cancelled",
"@health/activity_movement",
"@health/activity_exercise",
"@health/activity_stand"
],
"progressHashtagsTotal": [],
"mentionCountsHeading": "",
"periodStatsHashtagsTotal": [],
"progressChecklistReferenceNote": "",
"foldersToExclude": [
"Summaries",
"Saved Searches"
],
"progressHashtagsAverage": [],
"hashtagCountsHeading": "",
"progressYesNo": [
"@health/take_vitamins"
],
"progressHashtags": [],
"headingLevel": 2,
"todayProgressHeading": "",
"excludeToday": false,
"_logLevel": "DEBUG",
"progressYesNoChars": "✓·",
"todayProgressItems": [],
"progressMentions": [],
"periodStatsHashtagsAverage": [],
"weeklyStatsItems": [
"@health/take_vitamins",
"@health/drink_water",
"@health/heart_rate",
"@health/respiratory_rate",
"@health/wrist_temperature",
"@health/blood_oxygen",
"@health/slept",
"@health/morning_energy",
"@health/morning_mood",
"@health/morning_pain",
"@actions/planned",
"@actions/added",
"@actions/completed",
"@actions/cancelled",
"@health/activity_movement",
"@health/activity_exercise",
"@health/activity_stand",
"@health/evening_energy",
"@health/evening_mood",
"@health/evening_pain"
],
"progressDestination": "weekly",
"weeklyStatsIncludeCurrentWeek": false,
"period": "wtd"
}
2025-01-06 09:56:39 | DEBUG | makeProgressUpdate :: Starting for period 'wtd' with title 'Metrics' / params '{"excludeToday":false,"progressHeading":"Metrics","showSparklines":true,"period":"wtd"}' / source 'callback'
2025-01-06 09:56:39 | DEBUG | getPeriodStartEndDates :: starting with periodShortCode = wtd, excludeToday? false.
2025-01-06 09:56:39 | DEBUG | getPeriodStartEndDates :: wtd: currentWeekNum: 2, theYear: 2025, todaysISODayOfWeek: 1
2025-01-06 09:56:39 | DEBUG | getPeriodStartEndDates :: -> Mon Jan 06 2025 00:00:00 GMT-0600 (Central Standard Time), Sun Jan 12 2025 23:59:59 GMT-0600 (Central Standard Time), 2025-W02 / day 1, 2025-W02
2025-01-06 09:56:39 | INFO | gatherOccurrences :: starting with 5 calendar notes (including week/month notes) for '2025-W02' (2025-01-06 - 2025-01-12)
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: GOYesNo = <@health/take_vitamins> type object
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: - Found matching occurrence @health/take_vitamins on date 20250106.md
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: - Skipping ill-formed mention '@repeat(3' on date 20250107.md
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: - Found matching occurrence @health/take_vitamins on date 20250108.md
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: - Skipping ill-formed mention '@repeat(1' on date 20250109.md
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: - Skipping ill-formed mention '@repeat(1' on date 20250109.md
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: - Found matching occurrence @health/take_vitamins on date 20250109.md
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: - Skipping ill-formed mention '@repeat(2' on date 20250112.md
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: Now 1 occObjects
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: 0 sorted combinedHashtags: <>
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: Now 1 occObjects
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: sorted combinedMentions: <@actions/added,average,@actions/added,total,@actions/cancelled,average,@actions/cancelled,total,@actions/completed,average,@actions/completed,total,@actions/planned,average,@actions/planned,total,@health/activity_exercise,average,@health/activity_exercise,total,@health/activity_movement,average,@health/activity_movement,total,@health/activity_stand,average,@health/activity_stand,total,@health/blood_oxygen,average,@health/drink_water,average,@health/drink_water,total,@health/evening_energy,average,@health/evening_mood,average,@health/evening_pain,average,@health/heart_rate,average,@health/morning_energy,average,@health/morning_mood,average,@health/morning_pain,average,@health/respiratory_rate,average,@health/slept,average,@health/slept,total,@health/wrist_temperature,average>
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: Now 29 occObjects
2025-01-06 09:56:39 | DEBUG | gatherOccurrences :: Finished with 29 occObjects
2025-01-06 09:56:39 | DEBUG | generateProgressUpdate :: starting for 2025-W02 (2025-01-06 - 2025-01-12) with 29 occObjs and sparklines? true
2025-01-06 09:56:39 | DEBUG | makeProgressUpdate :: - created progress update in 256ms
2025-01-06 09:56:39 | DEBUG | makeProgressUpdate :: - about to update section 'Metrics' in weekly note '2025-W02.md' for day 1, 2025-W02
2025-01-06 09:56:39 | DEBUG | note / replaceSection :: Starting for note '2025-W02'. Will remove 'Metrics' -> 'Metrics [🔄 Refresh](noteplan://x-callback-url/runPlugin?pluginID=jgclark.Summaries&command=progressUpdate&arg0=%7B%22excludeToday%22%3Afalse%2C%22progressHeading%22%3A%22Metrics%22%2C%22showSparklines%22%3Atrue%2C%22period%22%3A%22wtd%22%7D)' level 2
2025-01-06 09:56:39 | DEBUG | note / removeSection :: Trying to remove 'Metrics' from note '2025-W02' with 88 paras
2025-01-06 09:56:39 | DEBUG | note / removeSection :: - headingIndex 10 level 2 endOfActive 87
2025-01-06 09:56:39 | DEBUG | note / removeSection :: -> removed section 'Metrics': total 30 paragraphs. Returning line 10
2025-01-06 09:56:39 | DEBUG | note / replaceSection :: - before insertHeading() call there are 58 paras
2025-01-06 09:56:39 | DEBUG | note / replaceSection :: - after insertHeading() call there are 59 paras
2025-01-06 09:56:39 | DEBUG | note / replaceSection :: - after insertParagraph() call there are 88 paras
2025-01-06 09:56:39 | INFO | makeProgressUpdate :: Updated section 'Metrics' in weekly note '2025-W02.md' for day 1, 2025-W02
Executing function 'progressUpdate'
2025-01-06 09:57:16 | DEBUG | jgclark.Summaries v0.22.1 :: progressUpdate (from template or callback): Starting with params '{"excludeToday":false,"progressHeading":"Metrics","showSparklines":true,"period":"wtd"}' (type: string) and source ''
2025-01-06 09:57:16 | DEBUG | jgclark.Summaries v0.22.1 :: - source determined to be 'callback'
2025-01-06 09:57:16 | DEBUG | jgclark.Summaries v0.22.1 :: makeProgressUpdate: Starting with params '{"excludeToday":false,"progressHeading":"Metrics","showSparklines":true,"period":"wtd"}' (type: string) from source 'callback'
2025-01-06 09:57:16 | DEBUG | - config after overriding with params-as-JSON-string '{"excludeToday":false,"progressHeading":"Metrics","showSparklines":true,"period":"wtd"}' (from callback) :: {
"progressHeading": "Metrics",
"periodStatsYesNo": [
"@health/take_vitamins"
],
"progressPeriod": "wtd",
"weeklyStatsDuration": 26,
"statsHeading": "Period Stats",
"periodStatsMentions": [],
"showAsHashtagOrMention": true,
"periodStatsMentionsTotal": [
"@health/drink_water",
"@health/slept",
"@actions/planned",
"@actions/added",
"@actions/completed",
"@actions/cancelled",
"@health/activity_movement",
"@health/activity_exercise",
"@health/activity_stand"
],
"periodStatsShowSparklines": true,
"progressMentionsAverage": [
"@health/drink_water",
"@health/heart_rate",
"@health/respiratory_rate",
"@health/wrist_temperature",
"@health/blood_oxygen",
"@health/slept",
"@health/morning_energy",
"@health/morning_mood",
"@health/morning_pain",
"@actions/planned",
"@actions/added",
"@actions/completed",
"@actions/cancelled",
"@health/activity_movement",
"@health/activity_exercise",
"@health/activity_stand",
"@health/evening_energy",
"@health/evening_mood",
"@health/evening_pain"
],
"includeHashtags": [],
"periodStatsMentionsAverage": [
"@health/drink_water",
"@health/heart_rate",
"@health/respiratory_rate",
"@health/wrist_temperature",
"@health/blood_oxygen",
"@health/slept",
"@health/morning_energy",
"@health/morning_mood",
"@health/morning_pain",
"@actions/planned",
"@actions/added",
"@actions/completed",
"@actions/cancelled",
"@health/activity_movement",
"@health/activity_exercise",
"@health/activity_stand",
"@health/evening_energy",
"@health/evening_mood",
"@health/evening_pain"
],
"folderToStore": "Summaries",
"showSparklines": true,
"progressMentionsTotal": [
"@health/drink_water",
"@health/slept",
"@actions/planned",
"@actions/added",
"@actions/completed",
"@actions/cancelled",
"@health/activity_movement",
"@health/activity_exercise",
"@health/activity_stand"
],
"progressHashtagsTotal": [],
"mentionCountsHeading": "",
"periodStatsHashtagsTotal": [],
"progressChecklistReferenceNote": "",
"foldersToExclude": [
"Summaries",
"Saved Searches"
],
"progressHashtagsAverage": [],
"hashtagCountsHeading": "",
"progressYesNo": [
"@health/take_vitamins"
],
"progressHashtags": [],
"headingLevel": 2,
"todayProgressHeading": "",
"excludeToday": false,
"_logLevel": "DEBUG",
"progressYesNoChars": "✓·",
"todayProgressItems": [],
"progressMentions": [],
"periodStatsHashtagsAverage": [],
"weeklyStatsItems": [
"@health/take_vitamins",
"@health/drink_water",
"@health/heart_rate",
"@health/respiratory_rate",
"@health/wrist_temperature",
"@health/blood_oxygen",
"@health/slept",
"@health/morning_energy",
"@health/morning_mood",
"@health/morning_pain",
"@actions/planned",
"@actions/added",
"@actions/completed",
"@actions/cancelled",
"@health/activity_movement",
"@health/activity_exercise",
"@health/activity_stand",
"@health/evening_energy",
"@health/evening_mood",
"@health/evening_pain"
],
"progressDestination": "weekly",
"weeklyStatsIncludeCurrentWeek": false,
"period": "wtd"
}
2025-01-06 09:57:16 | DEBUG | makeProgressUpdate :: Starting for period 'wtd' with title 'Metrics' / params '{"excludeToday":false,"progressHeading":"Metrics","showSparklines":true,"period":"wtd"}' / source 'callback'
2025-01-06 09:57:16 | DEBUG | getPeriodStartEndDates :: starting with periodShortCode = wtd, excludeToday? false.
2025-01-06 09:57:16 | DEBUG | getPeriodStartEndDates :: wtd: currentWeekNum: 2, theYear: 2025, todaysISODayOfWeek: 1
2025-01-06 09:57:16 | DEBUG | getPeriodStartEndDates :: -> Mon Jan 06 2025 00:00:00 GMT-0600 (Central Standard Time), Sun Jan 12 2025 23:59:59 GMT-0600 (Central Standard Time), 2025-W02 / day 1, 2025-W02
2025-01-06 09:57:16 | INFO | gatherOccurrences :: starting with 5 calendar notes (including week/month notes) for '2025-W02' (2025-01-06 - 2025-01-12)
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: GOYesNo = <@health/take_vitamins> type object
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: - Found matching occurrence @health/take_vitamins on date 20250106.md
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: - Skipping ill-formed mention '@repeat(3' on date 20250107.md
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: - Found matching occurrence @health/take_vitamins on date 20250108.md
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: - Skipping ill-formed mention '@repeat(1' on date 20250109.md
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: - Skipping ill-formed mention '@repeat(1' on date 20250109.md
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: - Found matching occurrence @health/take_vitamins on date 20250109.md
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: - Skipping ill-formed mention '@repeat(2' on date 20250112.md
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: Now 1 occObjects
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: 0 sorted combinedHashtags: <>
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: Now 1 occObjects
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: sorted combinedMentions: <@actions/added,average,@actions/added,total,@actions/cancelled,average,@actions/cancelled,total,@actions/completed,average,@actions/completed,total,@actions/planned,average,@actions/planned,total,@health/activity_exercise,average,@health/activity_exercise,total,@health/activity_movement,average,@health/activity_movement,total,@health/activity_stand,average,@health/activity_stand,total,@health/blood_oxygen,average,@health/drink_water,average,@health/drink_water,total,@health/evening_energy,average,@health/evening_mood,average,@health/evening_pain,average,@health/heart_rate,average,@health/morning_energy,average,@health/morning_mood,average,@health/morning_pain,average,@health/respiratory_rate,average,@health/slept,average,@health/slept,total,@health/wrist_temperature,average>
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: Now 29 occObjects
2025-01-06 09:57:16 | DEBUG | gatherOccurrences :: Finished with 29 occObjects
2025-01-06 09:57:16 | DEBUG | generateProgressUpdate :: starting for 2025-W02 (2025-01-06 - 2025-01-12) with 29 occObjs and sparklines? true
2025-01-06 09:57:16 | DEBUG | makeProgressUpdate :: - created progress update in 254ms
2025-01-06 09:57:16 | DEBUG | makeProgressUpdate :: - about to update section 'Metrics' in weekly note '2025-W02.md' for day 1, 2025-W02
2025-01-06 09:57:16 | DEBUG | note / replaceSection :: Starting for note '2025-W02'. Will remove 'Metrics' -> 'Metrics [🔄 Refresh](noteplan://x-callback-url/runPlugin?pluginID=jgclark.Summaries&command=progressUpdate&arg0=%7B%22excludeToday%22%3Afalse%2C%22progressHeading%22%3A%22Metrics%22%2C%22showSparklines%22%3Atrue%2C%22period%22%3A%22wtd%22%7D)' level 2
2025-01-06 09:57:16 | DEBUG | note / removeSection :: Trying to remove 'Metrics' from note '2025-W02' with 88 paras
2025-01-06 09:57:16 | DEBUG | note / removeSection :: - headingIndex 10 level 2 endOfActive 87
2025-01-06 09:57:16 | DEBUG | note / removeSection :: -> removed section 'Metrics': total 30 paragraphs. Returning line 10
2025-01-06 09:57:16 | DEBUG | note / replaceSection :: - before insertHeading() call there are 58 paras
2025-01-06 09:57:16 | DEBUG | note / replaceSection :: - after insertHeading() call there are 59 paras
2025-01-06 09:57:16 | DEBUG | note / replaceSection :: - after insertParagraph() call there are 88 paras
2025-01-06 09:57:16 | INFO | makeProgressUpdate :: Updated section 'Metrics' in weekly note '2025-W02.md' for day 1, 2025-W02
- Ngôn ngữ chính
- JavaScript
- Star
- 204
- Fork
- 82
- Merge trung bình
- 22 giờ 27 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NotePlan/plugins
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Dashboard: Task "Comment" Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Tidy: Issue with plugin.json Đang mởbug
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
Tất cả issue của NotePlan/plugins
Issue tương tự
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Improve Title Support Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·