I've been looking for a way to build an automation that sends an email to request participants that contains the last 3 external comments. I was able to make a nicely formatted portion but it only seems to be able to run on ALL comments instead of external explicitly:
{{#issue.comments.getFromEnd(0)}}
Comment by {{author.displayName}} on {{created.format("MM/dd")}} at {{created.shortTime}}:
{{body}}
{{/}}
So now the closest I've seen for this would be to use advanced branching to loop through all comments and perform an action only when {{issue.comments.internal}} equals false. In a perfect world this could iteratively add to a "Send email" action step, but that doesn't appear to be possible. So the next logical step is to see if this can be used to iteratively create variables instead, something like {{externalcomment(*)}} where (*) is the iteration of said variable. Does anyone know if this (or something equivalent) is possible?
Hi @Robert _Bobby_ Mittendorf,
I don't think that this is possible at the moment. The approach described by @Mark Segall isn't going to work as our branching happens async, so your main line can finish before the branches have and variables created on a branch are only scoped to that branch.
If it was just the last three comments it might be possible but without list filtering I can't think of a way to get the last three external comments.
Yeah I wasn't sure if that suggestion would work but I chalked it up to my explanation over anything else.
I DID figure out a way to do this though! I don't think it's a good solution, mind you, but it would work.
I would have an automation create a temporary issue, then use a For Each loop to conditionally add external comments to that issue. After that completes it would trigger another automation to extract the relevant comments (depending on order), put those in an email, and delete the dummy issue. I don't accept this as a viable solution because I would either have to create a large number of issues on this client's main project or set these automations to global to avoid messing with their increments.
This does make me think that an automation action that could do this without cluttering up metrics or increments would be very useful though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using Cloud or Data/Center version?
If you are using Cloud, I wonder if you could...
I have not tried this exact scenario, so perhaps experiment with it.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe you're on to something with the variable approach. I can't find my example of this, but I'm pretty positive it worked... You'd basically set the equivalent of a declare where you give it some random value as a starter and then create the same variable inside the branch:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.