{ "issue": { "url": "https://api.github.com/repos/laurent22/joplin/issues/15244", "repository_url": "https://api.github.com/repos/laurent22/joplin", "labels_url": "https://api.github.com/repos/laurent22/joplin/issues/15244/labels{/name}", "comments_url": "https://api.github.com/repos/laurent22/joplin/issues/15244/comments", "events_url": "https://api.github.com/repos/laurent22/joplin/issues/15244/events", "html_url": "https://github.com/laurent22/joplin/pull/15244", "id": 4368378146, "node_id": "PR_kwDOBLftOs7XnZej", "number": 15244, "title": " Restoring a folder from trash incorrectly modifies non-deleted notes causing spurious sync uploads", "user": { "login": "Siddhartha-singh01", "id": 237545817, "node_id": "U_kgDODiipWQ", "avatar_url": "https://avatars.githubusercontent.com/u/237545817?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Siddhartha-singh01", "html_url": "https://github.com/Siddhartha-singh01", "followers_url": "https://api.github.com/users/Siddhartha-singh01/followers", "following_url": "https://api.github.com/users/Siddhartha-singh01/following{/other_user}", "gists_url": "https://api.github.com/users/Siddhartha-singh01/gists{/gist_id}", "starred_url": "https://api.github.com/users/Siddhartha-singh01/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Siddhartha-singh01/subscriptions", "organizations_url": "https://api.github.com/users/Siddhartha-singh01/orgs", "repos_url": "https://api.github.com/users/Siddhartha-singh01/repos", "events_url": "https://api.github.com/users/Siddhartha-singh01/events{/privacy}", "received_events_url": "https://api.github.com/users/Siddhartha-singh01/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "labels": [ { "id": 519700741, "node_id": "MDU6TGFiZWw1MTk3MDA3NDE=", "url": "https://api.github.com/repos/laurent22/joplin/labels/bug", "name": "bug", "color": "cf353b", "default": true, "description": "It's a bug" }, { "id": 1366675015, "node_id": "MDU6TGFiZWwxMzY2Njc1MDE1", "url": "https://api.github.com/repos/laurent22/joplin/labels/sync", "name": "sync", "color": "91ca55", "default": false, "description": "sync related issue" } ], "state": "closed", "locked": false, "assignees": [], "milestone": null, "comments": 5, "created_at": "2026-05-02T07:56:12Z", "updated_at": "2026-05-02T20:30:59Z", "closed_at": "2026-05-02T20:30:50Z", "assignee": null, "author_association": "NONE", "active_lock_reason": null, "draft": false, "pull_request": { "url": "https://api.github.com/repos/laurent22/joplin/pulls/15244", "html_url": "https://github.com/laurent22/joplin/pull/15244", "diff_url": "https://github.com/laurent22/joplin/pull/15244.diff", "patch_url": "https://github.com/laurent22/joplin/pull/15244.patch", "merged_at": null }, "body": "## What\r\n\r\nWhen restoring a folder from trash, `restoreItems()` was fetching all \r\nnotes in the folder including notes that were never deleted and \r\nunconditionally writing `deleted_time: 0` and `updated_time: Date.now()` \r\nto every note.\r\n\r\nThis bumped `updated_time` on notes that were never in the trash, marking \r\nthem dirty for sync and causing spurious uploads and potential conflicts \r\non other devices.\r\n\r\n## Why\r\n\r\nThe child-folder path already applied the correct filter:\r\n\r\n```typescript\r\nconst deletedChildrenFolders = childrenFolders.filter(f => !!f.deleted_time);\r\nawait restoreItems(ModelType.Folder, deletedChildrenFolders);\r\n\r\nBut the notes path had no equivalent filter, and deleted_time was not even included in the fields list of the Folder.notes call, making filtering impossible.\r\n\r\n\r\n\r\n##How\r\nTwo-line fix in \r\nrestoreItems.tsTwo-line fix in \r\nrestoreItems.ts\r\n:\r\n\r\nAdd 'deleted_time' to the fields requested from Folder.notes\r\nFilter notes to only deleted_time > 0 before the recursive call\r\n\r\n\r\n##Testing\r\nAdded regression test: should not modify non-deleted notes when restoring a folder\r\nAll 7 tests in restoreItems.test.ts pass\r\nPlatforms affected\r\nAll (core library shared by Desktop, Mobile, CLI)\r\n\r\n\r\n\r\n\r\nThe platform prefix is All because the fix is in `@joplin/lib` which is shared across every app. Once you h", "closed_by": { "login": "laurent22", "id": 1285584, "node_id": "MDQ6VXNlcjEyODU1ODQ=", "avatar_url": "https://avatars.githubusercontent.com/u/1285584?v=4", "gravatar_id": "", "url": "https://api.github.com/users/laurent22", "html_url": "https://github.com/laurent22", "followers_url": "https://api.github.com/users/laurent22/followers", "following_url": "https://api.github.com/users/laurent22/following{/other_user}", "gists_url": "https://api.github.com/users/laurent22/gists{/gist_id}", "starred_url": "https://api.github.com/users/laurent22/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laurent22/subscriptions", "organizations_url": "https://api.github.com/users/laurent22/orgs", "repos_url": "https://api.github.com/users/laurent22/repos", "events_url": "https://api.github.com/users/laurent22/events{/privacy}", "received_events_url": "https://api.github.com/users/laurent22/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/15244/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "timeline_url": "https://api.github.com/repos/laurent22/joplin/issues/15244/timeline", "performed_via_github_app": null, "state_reason": null }, "comments": [ { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/4363340666", "html_url": "https://github.com/laurent22/joplin/pull/15244#issuecomment-4363340666", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/15244", "id": 4363340666, "node_id": "IC_kwDOBLftOs8AAAABBBNLeg", "user": { "login": "github-actions[bot]", "id": 41898282, "node_id": "MDM6Qm90NDE4OTgyODI=", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github-actions%5Bbot%5D", "html_url": "https://github.com/apps/github-actions", "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }, "created_at": "2026-05-02T07:56:21Z", "updated_at": "2026-05-02T20:30:59Z", "body": "All contributors have signed the CLA ✍️ ✅
Posted by the ****CLA Assistant Lite bot****.", "author_association": "CONTRIBUTOR", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/4363340666/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": { "id": 15368, "client_id": "Iv1.05c79e9ad1f6bdfa", "slug": "github-actions", "node_id": "MDM6QXBwMTUzNjg=", "owner": { "login": "github", "id": 9919, "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github", "html_url": "https://github.com/github", "followers_url": "https://api.github.com/users/github/followers", "following_url": "https://api.github.com/users/github/following{/other_user}", "gists_url": "https://api.github.com/users/github/gists{/gist_id}", "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github/subscriptions", "organizations_url": "https://api.github.com/users/github/orgs", "repos_url": "https://api.github.com/users/github/repos", "events_url": "https://api.github.com/users/github/events{/privacy}", "received_events_url": "https://api.github.com/users/github/received_events", "type": "Organization", "user_view_type": "public", "site_admin": false }, "name": "GitHub Actions", "description": "Automate your workflow from idea to production", "external_url": "https://help.github.com/en/actions", "html_url": "https://github.com/apps/github-actions", "created_at": "2018-07-30T09:30:17Z", "updated_at": "2026-05-05T14:51:38Z", "permissions": { "actions": "write", "administration": "read", "artifact_metadata": "write", "attestations": "write", "checks": "write", "code_quality": "write", "contents": "write", "copilot_requests": "write", "deployments": "write", "discussions": "write", "issues": "write", "merge_queues": "write", "metadata": "read", "models": "read", "packages": "write", "pages": "write", "pull_requests": "write", "repository_hooks": "write", "repository_projects": "write", "security_events": "write", "statuses": "write", "vulnerability_alerts": "read" }, "events": [ "branch_protection_rule", "check_run", "check_suite", "create", "delete", "deployment", "deployment_status", "discussion", "discussion_comment", "fork", "gollum", "issues", "issue_comment", "label", "merge_group", "milestone", "page_build", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "push", "registry_package", "release", "repository", "repository_dispatch", "status", "watch", "workflow_dispatch", "workflow_run" ] } }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/4363352621", "html_url": "https://github.com/laurent22/joplin/pull/15244#issuecomment-4363352621", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/15244", "id": 4363352621, "node_id": "IC_kwDOBLftOs8AAAABBBN6LQ", "user": { "login": "Siddhartha-singh01", "id": 237545817, "node_id": "U_kgDODiipWQ", "avatar_url": "https://avatars.githubusercontent.com/u/237545817?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Siddhartha-singh01", "html_url": "https://github.com/Siddhartha-singh01", "followers_url": "https://api.github.com/users/Siddhartha-singh01/followers", "following_url": "https://api.github.com/users/Siddhartha-singh01/following{/other_user}", "gists_url": "https://api.github.com/users/Siddhartha-singh01/gists{/gist_id}", "starred_url": "https://api.github.com/users/Siddhartha-singh01/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Siddhartha-singh01/subscriptions", "organizations_url": "https://api.github.com/users/Siddhartha-singh01/orgs", "repos_url": "https://api.github.com/users/Siddhartha-singh01/repos", "events_url": "https://api.github.com/users/Siddhartha-singh01/events{/privacy}", "received_events_url": "https://api.github.com/users/Siddhartha-singh01/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2026-05-02T08:01:33Z", "updated_at": "2026-05-02T08:01:33Z", "body": "I have read the CLA Document and I hereby sign the CLA\r\n", "author_association": "NONE", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/4363352621/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/4364093403", "html_url": "https://github.com/laurent22/joplin/pull/15244#issuecomment-4364093403", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/15244", "id": 4364093403, "node_id": "IC_kwDOBLftOs8AAAABBB7H2w", "user": { "login": "mrjo118", "id": 6963004, "node_id": "MDQ6VXNlcjY5NjMwMDQ=", "avatar_url": "https://avatars.githubusercontent.com/u/6963004?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mrjo118", "html_url": "https://github.com/mrjo118", "followers_url": "https://api.github.com/users/mrjo118/followers", "following_url": "https://api.github.com/users/mrjo118/following{/other_user}", "gists_url": "https://api.github.com/users/mrjo118/gists{/gist_id}", "starred_url": "https://api.github.com/users/mrjo118/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mrjo118/subscriptions", "organizations_url": "https://api.github.com/users/mrjo118/orgs", "repos_url": "https://api.github.com/users/mrjo118/repos", "events_url": "https://api.github.com/users/mrjo118/events{/privacy}", "received_events_url": "https://api.github.com/users/mrjo118/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2026-05-02T15:05:53Z", "updated_at": "2026-05-02T15:05:53Z", "body": "recheck", "author_association": "COLLABORATOR", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/4364093403/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/4364167694", "html_url": "https://github.com/laurent22/joplin/pull/15244#issuecomment-4364167694", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/15244", "id": 4364167694, "node_id": "IC_kwDOBLftOs8AAAABBB_qDg", "user": { "login": "mrjo118", "id": 6963004, "node_id": "MDQ6VXNlcjY5NjMwMDQ=", "avatar_url": "https://avatars.githubusercontent.com/u/6963004?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mrjo118", "html_url": "https://github.com/mrjo118", "followers_url": "https://api.github.com/users/mrjo118/followers", "following_url": "https://api.github.com/users/mrjo118/following{/other_user}", "gists_url": "https://api.github.com/users/mrjo118/gists{/gist_id}", "starred_url": "https://api.github.com/users/mrjo118/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mrjo118/subscriptions", "organizations_url": "https://api.github.com/users/mrjo118/orgs", "repos_url": "https://api.github.com/users/mrjo118/repos", "events_url": "https://api.github.com/users/mrjo118/events{/privacy}", "received_events_url": "https://api.github.com/users/mrjo118/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2026-05-02T15:46:34Z", "updated_at": "2026-05-02T15:46:34Z", "body": "@Siddhartha-singh01 See comment https://github.com/laurent22/joplin/issues/15242#issuecomment-4364164186", "author_association": "COLLABORATOR", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/4364167694/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/4364661850", "html_url": "https://github.com/laurent22/joplin/pull/15244#issuecomment-4364661850", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/15244", "id": 4364661850, "node_id": "IC_kwDOBLftOs8AAAABBCd0Wg", "user": { "login": "laurent22", "id": 1285584, "node_id": "MDQ6VXNlcjEyODU1ODQ=", "avatar_url": "https://avatars.githubusercontent.com/u/1285584?v=4", "gravatar_id": "", "url": "https://api.github.com/users/laurent22", "html_url": "https://github.com/laurent22", "followers_url": "https://api.github.com/users/laurent22/followers", "following_url": "https://api.github.com/users/laurent22/following{/other_user}", "gists_url": "https://api.github.com/users/laurent22/gists{/gist_id}", "starred_url": "https://api.github.com/users/laurent22/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laurent22/subscriptions", "organizations_url": "https://api.github.com/users/laurent22/orgs", "repos_url": "https://api.github.com/users/laurent22/repos", "events_url": "https://api.github.com/users/laurent22/events{/privacy}", "received_events_url": "https://api.github.com/users/laurent22/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2026-05-02T20:30:51Z", "updated_at": "2026-05-02T20:30:51Z", "body": "Thanks for the contribution. We’re closing this PR because it does not follow the project’s contribution policy: it is not based on a triaged, accepted issue and does not address a concrete problem agreed upon by maintainers.\r\n\r\nWhile the change itself is not necessarily incorrect, reviewing and maintaining such PRs takes time away from higher-priority work.\r\n\r\nPlease see our [Contribution Scope Policy](https://joplinapp.org/help/dev/#contribution-scope) for details on what kinds of contributions we accept.\r\n\r\nIf you intend to participate in GSoC, please make sure you read our [GSoC guidelines](https://github.com/joplin/gsoc).\r\n\r\nAnd [please pay attention to our AI policy](https://github.com/joplin/gsoc/blob/master/ai_policy.md).\r\n", "author_association": "OWNER", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/4364661850/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null } ] }