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

[Automation for Jira] Get last added attachment to issue using smart values

Hi

 

Is it possible to get name or id of last added attachment to issue using smart values?

I tried issue.attachment.id.last but it get last item from attachments list.

 

Regards,

Sebastian

1 answer

I'm not sure if this helps you exactly but if you use the smart value: {{attachment.created}}, it will give you a comma separated list of the creation date of all the attachments on an issue.

Hi @Michael March 

Thanks for tip but this is not what I need.

I need to get last added attachment. Dates are ok but I can't work in automation and search attachments based on creation date.

 

Regards,

Seba

Hello

It is possible to use the smart value {{issue.attachment.last.id}}.

However, I find it very unreliable and inconsistent and it often does NOT report the last Id.

You should experiment with that - how is it different from what you tried at first?

Hi @Stuart__ 

 

*.first or *.last return first/last item from attachment list. In many cases last attachment on list isn't last added attachment.

 

I fixed this by using script runner in automation for jira. This gave me attachments list which I was able to use in automation.

 

Regards,

Seba

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,184 views 8 28
Join discussion

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