Commit ddf5edf
authored
fix: fall back to summary when title is empty in formatCell (#380)
The reports/upcoming API uses the calendar partial
(schedules/calendar/_entry.json.jbuilder) which emits summary but
not title for schedule entries. The SDK deserializes the missing
field to an empty string, so formatCell's existing name → title → id
chain was appending "" for each entry and joining them into
", , , , ..." in --md and styled output.
Add summary as a fallback between title and id, and add empty-string
guards on the name and title checks so an empty field doesn't
silently win over a non-empty one lower in the chain.
Schedule::Entry#title delegates to summary in bc3, so the two fields
carry identical data when both are present; summary is the canonical
field in the calendar API response.
Fixes: reports schedule --md showing blank entry names1 parent d005961 commit ddf5edf
2 files changed
Lines changed: 32 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
873 | 897 | | |
874 | 898 | | |
875 | 899 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
766 | | - | |
767 | | - | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
768 | 771 | | |
769 | | - | |
| 772 | + | |
770 | 773 | | |
| 774 | + | |
| 775 | + | |
771 | 776 | | |
772 | 777 | | |
773 | 778 | | |
| |||
0 commit comments