Hi,
I have a special draft called “Kochplan,” where I collect recipes I want to cook. Once I’ve cooked a recipe, I mark it as done. I have an action that deletes checked-off entries:
let kochplan = Draft.queryByTitle("Kochplan:")[0];
kochplan.content = draft.content.replace(/^.*@done\n?/gm, '');
kochplan.update();
The action works, but if you run it without having the Kochplan draft open in the editor, the Kochplan-draft disappears completely. You can’t find it anymore, not even among the deleted drafts. I see that the action is pretty poor, but I checked that there is exactly one Kochplan-Draft and that it contains undone items. Am I missing something here?