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

possible to sort results when creating a report with Butler?

Daniel Morrow October 19, 2020

I'm developing a Butler report for our weekly check-in meeting, and I haven't found a way to sort the order that my cards are displayed.  I want to sort by the card's Due Date. Is this possible?

2 answers

1 vote
milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2020

@Daniel Morrow sounds like an interesting hack to work on with my Superhero Power

https://www.notion.so/Superhero-Power-ac42df32932f423fbbe2d60cf2d0dbab

Daniel Morrow October 19, 2020

Thanks @milynnus  , I'll investigate this solution as well.

As a former coder turned podcast producer, this is giving me a chance to dust off those old skills.

Thanks guys!

milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2020

@Daniel Morrow completed code and test. Will update my Notion pages by EOD

Append the sort parameter to each line of report. For dates like due date you need to format it using cardduedate~YYYYMMDD. The program will strip the sort parameter and return {httpresponse.sorted_report} and you can mail it out.

every day at 10:40 pm, create a report in variable "report_to_sort" with all cards with a due date using pattern "{cardduedate~YYYYMMDD}^{cardname} was created on {cardcreationdate}", post to url "https://25368.wayscript.io/butler/?registry=<registry ID>&module=5f8e4ccf1787ba5a284d5f5a" with payload "{\"report_variable\" : \"{$report_to_sort}\", \"reverse\" : \"Yes\"}", and send an email notification to "sgi.collective.sg@gmail.com" with subject "Sorted Report" and message "From\n{$report_to_sort}\n\nTo\n{httpresponse.sorted_report}"
Like Daniel Morrow likes this
Daniel Morrow October 19, 2020

Thanks @milynnus  ...gonna get back on this tomorrow.  Appreciate the help!

1 vote
Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 19, 2020

@Daniel Morrow you could have another Butler command that sorts lists by due date and execute that prior to the report being generated

Daniel Morrow October 19, 2020

Thanks, @Iain Dooley . That would work but I'm grouping in the document on something other than what list they're in. And I don't want to modify the board at all when generating the report.

Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 19, 2020

@Daniel Morrow hmmm might have to go with a custom API call then, for example this Trellinator code gives me date ordered list of cards in my "Coming up" list on my "iaindooley" board:

https://gist.github.com/iaindooley/dd42ccef801e4b14daf13e14005e62c3

You can execute Trellinator code via BenkoBot:

https://app.benkobot.com/

or you can set it up under Google Apps Script:

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Introducing-Trellinator-Automate-Trello-with-Google-Apps-Script/ba-p/925271

Like Daniel Morrow likes this
Daniel Morrow October 19, 2020

Thanks @Iain Dooley   I'll take a look at that. Time to go next level with my Trello game :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events