Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Comment URL link to most recently uploaded attachment

Use case: Historically we've been able to copy the URL to an attachment and paste that URL in a URL field. In the new Jira UI you can no longer (easily) copy the URL of the attachment

Potential workaround: Jira Automation Rule, triggered by a change to Attachment which will comment the URL to the most recent attachment. Ideally we would like the URL to the attachment directly to  Custom Field, but would be okay with the URL link being commented and copied from the comments as well.

I'm having trouble writing a rule to return the URL of the most recent attachment closest I've gotten is {{#issue.attachment.last}} "{{content}}">{{filename}}</a></li>{{#issue.attachment.last}} but last. does not seem to return the most recently uploaded attachment 

Any other thoughts would be much appreciated. Thank you!

2 answers

1 vote
Sam Harding Atlassian Team Mar 07, 2021

Hi @Ryan O'Donnell 

The ability to sort/filter/mutate a list in smart values is something that is currently lacking in Automation for Jira. We are tracking this problem in issues such as https://codebarrel.atlassian.net/browse/AUT-1241, but at this time, sorting as list by chronological order is not something that is possible. Automation for Jira gets back the list of attachments from the Jira API, which is not guaranteed in its ordering. What you have already done is as close as possible to the solution that is currently available.

Cheers

Sam

@Ryan O'Donnell  @Sam Harding 

I have a workaround for this problem using a combination of wiki markup and smart values. You can use your Base URL or [^attachment.ext] . Works for the description field, so I imagine a comments or any field using wiki render will work just fine. 

 

Trigger: when value changes for Attachment

Edit Issue fields

[<baseURL>/attachment/{{fieldChange.to}}/{{fieldChange.toString}}]

OR

[^{{fieldChange.toString}}]

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

454 views 19 23
Read article

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