Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created March 25, 2021 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/daf15db182dfbe8e9a5bc22decf0a5e5 to your computer and use it in GitHub Desktop.
Save iaindooley/daf15db182dfbe8e9a5bc22decf0a5e5 to your computer and use it in GitHub Desktop.
createAndArchiveSubtaskCards
var added = new Notification(notification).addedLabel(/Subtask.*/i);
if(parts = /Subtask(.*)/i.exec(added.name()))
{
if(!(listname = parts[1].trim()))
listname = "Checklist";
added.card().checklist(listname).items().each(function(item)
{
item.setName(
Card
.create(
added.card().currentList(),item.name()
)
.archive()
.link()
);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment