Repository navigation
fix: drop stale journal refs when clearing datetime values - #13417
Merged
Merged
Conversation
Clearing Deadline/Scheduled to empty-placeholder left past journal pages in :block/refs because get-journal-day-from-long treated the placeholder as a timestamp and looked up a nil journal-day. Fixes logseq/db-test#1282 Co-authored-by: Tienson Qin <[email protected]>
tiensonqin
force-pushed
the
logseq/fix-cleared-date-journal-refs-a5a2
branch
from
September 24, 2026 16:42
3e0b519 to
5247c23
Compare
devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 1, 2026
Clearing Deadline/Scheduled to empty-placeholder left past journal pages in :block/refs because get-journal-day-from-long treated the placeholder as a timestamp and looked up a nil journal-day. Fixes logseq/db-test#1282 Co-authored-by: Cursor Agent <[email protected]>
devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 8, 2026
Clearing Deadline/Scheduled to empty-placeholder left past journal pages in :block/refs because get-journal-day-from-long treated the placeholder as a timestamp and looked up a nil journal-day. Fixes logseq/db-test#1282 Co-authored-by: Cursor Agent <[email protected]>
devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 8, 2026
Clearing Deadline/Scheduled to empty-placeholder left past journal pages in :block/refs because get-journal-day-from-long treated the placeholder as a timestamp and looked up a nil journal-day. Fixes logseq/db-test#1282 Co-authored-by: Cursor Agent <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes logseq/db-test#1282
Clearing a datetime property (Deadline, Scheduled, or a user datetime) to
:logseq.property/empty-placeholderkept the property on the node, but past journal pages still appeared in Linked References. Today's date looked fine because the task already lives on today's journal; Datascript still kept a stale:block/refsentry for past days.get-journal-day-from-longtreated the empty-placeholder keyword as a timestamp.ms->journal-dayreturned nil, and(d/datoms db :avet :block/journal-day nil)then resolved to an existing journal page — typically the earliest past journal.This change only resolves journal refs from numeric millisecond values, so a cleared datetime no longer keeps or re-adds a journal ref.
Tests
:block/refs(including the bulk rebuild path)remove-block-property!still clears refs