Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Search based on custom fields
function searchBasedOnCustomFields(notification)
{
var field = new Notification(notification).changedCustomField("Query");
new Trellinator().boards().each(function(board)
{
board.cards().each(function(card)
{
if(card.id() != field.card().id())
{
board.customFields().each(function(loop)
{
if((card.customFieldValue(loop.name())) && (card.customFieldValue(loop.name()).toLowerCase().indexOf(field.value().toLowerCase()) > -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