I have an automation rule that works across all the issues linked to an epic. We are sending issue details to an external process via webhook. Using {{#issues}}{{key}}, {{/}} in the body of the web request I get a comma separated list of all the keys. If I run {{attachment.filename}} against ONE issue (different rule to test the smart value) I get a comma separated list of the attachments for that issue. What I would really like is a list of all the issue keys linked to the epic, and all the attachments associated with those issues. They don't even have to be associated pairs, I just need the values. I tried variations of:
{#issues}}{{key}}{{attachment.filename}}, {{/}}
{#issues}}{{key}}, {{attachment.filename}}, {{/}}
{#issues}}{{key}} {{#attachments}}{{filename}}, {{/}}
{#issues}}{{key}} {{/}}, {{#attachments}}{{filename}}, {{/}}
...
and to attempt just the file names:
{{attachment.filename}}
{#attachments}}{{filename}}, {{/}}
etc.
the best I got was a list of issue keys followed by a string of commas and spaces.
I found the answer -- {{#issues}}{{key}}_{{attachment.filename}} {{/}} produces string:
XXX-001_FileName1, FileName2, FileName3 XXX-02_FileNameX, ..., ...
Hi David - could you please show me the screen shots for this rule? I've tried to implement it, and am failing miserably. ;-(
Thanks,
Charlene
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The text I put in the answer is exactly what I am using.
{{#issues}} tells Jira to cycle through all issues that match the rule filter. each {{xxx}} thereafter is part of the string. Anything between }} and {{ is treated as text. {{/}} ends the string telling Jira to move to the next instance.
{{#issues}}{{key}}_{{attachment.filename}}, {{/}}
What happens when you run the rule? Can you upload a screenshot of your rule?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David - thanks for the speedy reply! Below is a pic of the rule. I haven't spent a lot of time on email content other than trying to get attachment names for all issues. The rule is generating an email for issues resolved within the past 7 days, displaying attachment name along with the key.
Running the rule run was a success it shows:
Email received includes no content.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure why this is happening, your rule looks correct, assuming of course the issues your query found have attachments. If they don't you will get APS-2437_, APS-2438_, APS-2439_, ... I'm using data center so I checked the Cloud documentation and {{attachment.filename}} is the correct tag.
I just rigged up a test with a manual and scheduled trigger and got a good list. There are a couple of options on the schedule trigger that may have an effect. Screen shots of the rule segments and results are attached.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David - the issues do indeed have attachments. I'll review further. Thanks again for taking a look.
Charlene
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.