Created
April 19, 2019 23:37
-
-
Save iaindooley/8c69a0822c048bd5d062de510341ded2 to your computer and use it in GitHub Desktop.
Search based on custom fields within board
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 searchBasedOnCustomFieldsWithinBoard(notification) | |
{ | |
var field = new Notification(notification).changedCustomField("Query"); | |
field.card().board().cards().each(function(card) | |
{ | |
if(card.id() != field.card().id()) | |
{ | |
field.card().board().customFields().each(function(loop) | |
{ | |
if((card.customFieldValue(loop.name())) && (card.customFieldValue(loop.name()).indexOf(field.value()) > -1)) | |
{ | |
field.card().addChecklist("Results",function(list) | |
{ | |
list.addUniqueItem(card.link()); | |
}); | |
} | |
}); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment