Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Send last attachments email

João Cunha January 20, 2025

Hi all

I'm trying to create an automation that, when a ticket transitions to a specific state, users have to fill in a mandatory text field that allows them to attach files.

When transiting, this automation via webhook will check if any attachments were added in the last 1 minute.

If so, I want to add the URL of each file to a text field but it turns out that it is only registering the last attachment.

In advanced branching is it possible to concatenate all results into one variable?

In the logs everything appears on a single line, but in the ticket, only the last result is recorded

image.png image.png image.png image.png image.png

Thank you!

2 answers

0 votes
Gerusa Lobo _e-Core_
Atlassian Partner
January 20, 2025 edited

Hi João,

"In advanced branching is it possible to concatenate all results into one variable?"

I didn't find how edit a variable in automation. 

And I think it is your root cause problem. Because that, the variable was updated in each row of the loop and you have only the last attachment, 

But, maybe, you could use a post-function in a workflow transition, to set this field.

I make something similar a month ago, using script.

The post function get the new attachments ID's and update the list on field.

0 votes
Gerusa Lobo _e-Core_
Atlassian Partner
January 20, 2025 edited

Hi João,

Maybe the best solution will be create a screen in this transition, that have the text field and the attachment field, with a required fields validators.

If it is necessary, maybe a behavior could be used to hide or present a field, based on another fields content.

I hope that it could be help you.

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, jira service management, devops, ship quality code, atlassian webinar, continuous delivery, integrated workflows, change management, developer productivity, agile teams, atlassian community events, ace, atlassian learning

Ship quality code faster with Jira Service Management ✨

In the wake of growing customer expectations, development teams are facing more pressure to deliver innovations faster. Register for this 45-minute webinar to learn how devs can accelerate software delivery and time-to-market with Jira Service Management.

Register now 🚀
AUG Leaders

Atlassian Community Events