Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Capture Checklist percentage complete as a custom field for Butler

Is there a way that I can capture the percentage complete (currently 29% as shown below) within a custom field which can then be displayed on the card front and used in Butler reports? The value would need to dynamically update as checklist items were ticked off.

Annotation 2020-08-21 111758.jfif

I have 164 cards, each with a milestone checklist and I have been asked to report the percentage complete for each Card.

2 answers

1 accepted

@Iain Dooley  I read in the gist that your have new Notification.... does it mean that this function behaves like a webhook and it gets triggered and the update the CF ? So far, my new Butler add on can be embedded in Butler rules and commands but cannot sit in the shadow waiting for some event to be triggered. 

Iain Dooley Community Leader Aug 21, 2020

@SGi Admin yep Trellinator adds a webhook to the member object itself and when you first initialise it, to every board the Trellinator user is a member of. Then, whenever the member is removed from or added to a board, the webhooks are updated. Whenever a notification is received, any function installed for that board (you can install a function for one board, a group of boards, or globally) is given the opportunity to deal with the notification.

@Iain Dooley  Thanks for sharing. I know that for webhook you need to associate with a token which is member specific. Is that what you meant by “add webhook to member object” ? I also know that there is a callback URL for webhook, is this the endpoint and where the function sits? In your case, where is this endpoint ‘hosted’ ?
I am trying to imagine how I can do it, perhaps like https:123455.wayscript.io/?user=something&func=abc .... can start to see the complexity. Your answers to above will be very helpful. Thanks in advance. Learning from the guru. 

Iain Dooley Community Leader Aug 21, 2020

@SGi Admin 

I know that for webhook you need to associate with a token which is member specific. Is that what you meant by “add webhook to member object”?

You can register a webhook on any model: a card, a list, a board, a member. When anything in that model changes, you will receive a notification. I use a member webhook on the Trellinator user itself in order to detect when the user is added to or removed from a board, and I use board webhooks for everything else. When the user is added as a member to a board, a webhook is registered for that board, when the user is removed from a board, the webhook is removed also.

I also know that there is a callback URL for webhook, is this the endpoint and where the function sits? In your case, where is this endpoint ‘hosted’?

Ultimately, the endpoint is just the published web app URL of the Google Apps Script project that is attached to the Trellinator spreadsheet. However, because Trello overwhelms Apps Script, I have a "buffer" that I let people use for free which sits in the middle, accepts all notifications and forwards them on. This buffer is open source, though, so people can set up their own if they'd prefer. See "A Note about Privacy" here https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Introducing-Trellinator-Automate-Trello-with-Google-Apps-Script/ba-p/925271


I am trying to imagine how I can do it, perhaps like https:123455.wayscript.io/?user=something&func=abc .... can start to see the complexity. Your answers to above will be very helpful. Thanks in advance. Learning from the guru. 

All the stuff that handles the "framework" side of things (rather than the API libraries) is in this repo:

https://github.com/iaindooley/trellinator

The webhook registration begins here:

https://github.com/iaindooley/trellinator/blob/master/Accessible.js#L8

You can download that repo to see how the webhook registration and notification handling works although it's specific to running under Apps Script so I'm not sure how useful it will be in doing the same thing under wayscript.

@Iain Dooley Thank you.

I managed create a webhook using idModel = member_id and it triggered the endpoint as specified. I converted the the raw data from json to a Struct which has model and action as the top most keys. This is vey similar to the trigger outputs that I get from using Wayscript triggers.

The process that allows me to execute Superhero Power module from Butler can now be applied to the action and the associated variables from the dictionary.

Next I have to figure out how to record the subscription for the equivalent of your webhook functions. Currently thinking of using card links from the registry to the code repository. It does mean all the applicable modules for that action type will be triggered. 

py-trello and Wayscript certainly helped a lot to get me here.

Now I have to add the webhook registration for all users of Superhero Power so that they can use it from a Butler Http Request and also from the webhook.

Thanks again for your help. They key insight has been the use of member as the idModel for the Webhook and then register other webhook idModels depending on the function / module. 

@Mike Moran sorry again for hijacking your post. This forum does not have the equivalent of a chat channel.

Like Iain Dooley likes this

@SGi Admin no problem, all good!

Like Iain Dooley likes this

Thanks @Mike Moran 

@Iain Dooley  I completed it. Tested with the POC calculation. Design is able handle idModel for board, list, card and member on 4 separate endpoints by using query parameters. Great learning. More testing to handle exceptions. Thanks for programming tip. 

Like Iain Dooley likes this

@Mike Moran I lost my longer version of this reply so here's the gist of it.

(1) the % are not stored on the card object. I am not aware of any way to intercept Trello as it computes and updates the countCheckItem such that you can keep it in a CF

(2) there are 4 actions for Webhooks fr items e.g. updateCheckItemStateOnCard. You probably have to use this route if you want to do it yourself

(3) I read the Board Export now handles checklist. You might want to export your checklist and work with spreadsheets for your reporting. I have not tried it .

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

📹 What is Trello?

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. I'll be sharing with you a series of videos with my top tips on how to best use Trello...

752 views 13 30
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you