Created
March 8, 2026 03:06
-
-
Save avernet/1ef23fbdfe089015f34183c543312672 to your computer and use it in GitHub Desktop.
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
| const descendants = WF.currentItem().getChildren().flatMap(function getDesc(item) { | |
| return [item, ...item.getChildren().flatMap(getDesc)]; | |
| }); | |
| const completed = descendants.filter(item => item.isCompleted() && !item.isReadOnly()); | |
| if (completed.length === 0) { | |
| WF.showMessage("No completed items found.", false); | |
| } else { | |
| WF.editGroup(() => completed.forEach(item => WF.completeItem(item))); | |
| WF.showMessage(`Uncompleted ${completed.length} item(s).`); | |
| setTimeout(WF.hideMessage, 5000); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment