Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created September 12, 2020 12:50
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/85f9fc50fb639320e2d6c0d6442591af to your computer and use it in GitHub Desktop.
Save iaindooley/85f9fc50fb639320e2d6c0d6442591af to your computer and use it in GitHub Desktop.
Increment allowed visits
function incrementAllowedVisits(params,signature,original_time)
{
new Board(params).cards().each(function(card)
{
var existing = card.customFieldValue("Allowed Visits");
var incremented = existing ? existing+1 : 1;
card.setCustomFieldValue("Allowed Visits",incremented);
Utilities.sleep(2000);
});
ExecutionQueue.push("incrementAllowedVisits",params,signature,original_time.addMonths(1));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment