JamesNZL/notion-assignment-import

Assignment without due dates are not being imported into Notion

migszu opened this issue · 2 comments

  • Matthew's PR will mutate all assignment due dates
  • If the assignment due date does not exist, it will assign it to the Unix epoch
  • This will cause assignments without due dates to be treated as past assignments, and hence ignored on import

In the meantime, a workaround:

  1. Right click in the popup window, and click Inspect

  2. Go to the Console tab for the extension popup, and paste the following:

await chrome.storage.local.set({
  savedAssignments: Object.fromEntries(
    Object.entries((await chrome.storage.local.get()).savedAssignments)
      .map(([key, value]) => [
        key,
        value.map(assignment => {
          if (assignment.due !== "1970-01-01T12:00:00.000Z") {
              return assignment;
          }

          console.log(`skipping ${assignment.name}`);
          assignment.due = "2024-12-12T12:00:00.000Z";
          return assignment;
        })
      ]),
  ),
});
  1. Hit Enter

That will make all of your assignments that don't have due dates be imported into Notion as being due in December (right now, it's due in 1970, which is in the past, so it's ignored by the importer).

You can then click+drag (or shift+click) in Notion (probably easiest in a table view) to clear all of the placeholder due dates at once.