Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Search based on custom fields within board
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