Created
February 13, 2019 02:47
-
-
Save iaindooley/d1ffa01f7f20d8a30dbbd2524392cf00 to your computer and use it in GitHub Desktop.
Total custom field
This file contains 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
function updateCustomFieldTotal(notification) | |
{ | |
var card = new Notification(notification).updatedCustomField("My Field"); | |
if(parts = /(.+) \(([0-9]+)\)/.exec(card.currentList().name())) | |
{ | |
new_count = parseInto(parts[2])+parseInt(card.customFieldValue("My Field")); | |
card.currentList().setName(parts[1]+" ("+new_count+")"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment