Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created April 15, 2019 08:06
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/4a3eaf053cf15be5aa9c20d9179b1a3f to your computer and use it in GitHub Desktop.
Save iaindooley/4a3eaf053cf15be5aa9c20d9179b1a3f to your computer and use it in GitHub Desktop.
Get all plugin data
function getCardStoryPointsForList(board_name,list_name)
{
var cards_with_points = new Trellinator().board(board_name).list(list_name).cards().find(function(card)
{
var pd = card.load().data.pluginData;
for(var i = 0;i < pd.length;i++)
{
try
{
card.points = JSON.parse(pd[i].value).points;
}
catch(e)
{
card.points = null;
}
}
if(card.points)
return card;
else
return false;
});
cards_with_points.each(function(card)
{
Logger.log("card: "+card.link()+" has points: "+card.points);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment